def get_largest_component(graph):
"""Gets the giant component of a subgraph
:param pybel.BELGraph graph: A BEL Graph
:return: The giant component of the graph
:rtype: pybel.BELGraph
"""
return max(nx.weakly_connected_component_subgraphs(graph), key=len)
评论列表
文章目录