Generate weakly connected components as subgraphs.
G : NetworkX Graph
A directed graph.
copy : bool
If copy is True, graph, node, and edge attributes are copied to the subgraphs.