Tutorial — NetworkX 2.6.2 documentation
https://networkx.org/documentation/stable/tutorial.html>>> import networkx as nx >>> G = nx. Graph By definition, a Graph is a collection of nodes (vertices) along with identified pairs of nodes (called edges, links, etc). In NetworkX, nodes can be any hashable object e.g., a text string, an image, an XML object, another Graph, a customized node object, etc.