in reply to breaking up undirected graphs
You want the connected_components method of the Graph module. That's exactly what it does.