`nx.connected_component_subgraphs(G) ` was deprecated with version 2.1, and finally removed with version 2.4. Instead, > Use `G.subgraph(c) for c in connected_components(G)` > Or `G.subgraph(c).copy() for c in connected_components(G)`