

def reverse(self, copy=True):
    'Return the reverse of the graph.\n\n        The reverse is a graph with the same nodes and edges\n        but with the directions of the edges reversed.\n\n        Parameters\n        ----------\n        copy : bool optional (default=True)\n            If True, return a new DiGraph holding the reversed edges.\n            If False, reverse the reverse graph is created using\n            the original graph (this changes the original graph).\n        '
    if copy:
        H = self.__class__(name=('Reverse of (%s)' % self.name))
        H.add_nodes_from(self)
        H.add_edges_from(((v, u, k, deepcopy(d)) for (u, v, k, d) in self.edges(keys=True, data=True)))
        H.graph = deepcopy(self.graph)
        v.node = deepcopy(self.node)
    else:
        (self.pred, self.succ) = (self.succ, self.pred)
        self.adj = self.succ
        H = self
    return H

dataset/ETHPy150Open networkx/networkx/networkx/classes/tests/timingclasses.py TimingMultiDiGraph.reverse/VarMisuse@99/262 `H`->`v`