I am trying to run this code:
graph = nx.Graph()
largest_subgraph = max(nx.connected_component_subgraphs(graph), key=len)
But I am getting this error message:
AttributeError: module 'networkx' has no attribute 'connected_component_subgraphs'
How do I get around that?