This documents the development version of NetworkX. Documentation for the current release can be found here.
Returns the graph complement of G.
A NetworkX graph
Note that complement does not create self-loops and also
does not produce parallel edges for MultiGraphs.
Graph, node, and edge data are not propagated to the new graph.