networkx.xdigraph.XDiGraph:
Digraphs with (optional) self-loops, (optional) multiple edges,
arbitrary (hashable) objects as nodes, and arbitrary
objects associated with edges.
networkx.xgraph.XGraph:
A class implementing general undirected graphs, allowing
(optional) self-loops, multiple edges, arbitrary (hashable)
objects as nodes and arbitrary objects associated with
edges.