'Return an undirected copy of the graph.
Returns
G : Graph/MultiGraph
A deepcopy of the graph.
See Also
copy, add_edge, add_edges_from
Notes
This returns a "deepcopy" of the edge, node, and
graph attributes which attempts to completely copy
all of the data and references.
This is in contrast to the similar `G = nx.DiGraph(D)` which returns a
shallow copy of the data.
See the Python copy module for more information on shallow
and deep copies, http://docs.python.org/library/copy.html.
Examples
>>> G = nx.path_graph(2)   # or MultiGraph, etc
>>> H = G.to_directed()
>>> list(H.edges())
[(0, 1), (1, 0)]
>>> G2 = H.to_undirected()
>>> list(G2.edges())
[(0, 1)]'

def to_undirected(self):

    return deepcopy(self)
