

def reverse(self):
    '\n        Generate the reverse of a directed graph, returns an identical graph if not directed.\n        Attributes & weights are preserved.\n        \n        @rtype: digraph\n        @return: The directed graph that should be reversed.\n        '
    assert wt.DIRECTED, ('Undirected graph types such as %s cannot be reversed' % self.__class__.__name__)
    N = self.__class__()
    N.add_nodes((n for n in self.nodes()))
    for (u, v) in self.edges():
        wt = self.edge_weight((u, v))
        label = self.edge_label((u, v))
        attributes = self.edge_attributes((u, v))
        N.add_edge((v, u), wt, label, attributes)
    return N

dataset/ETHPy150Open nerdvegas/rez/src/rez/vendor/pygraph/mixins/common.py common.reverse/VarMisuse@13/96 `self`->`wt`