def reverse(G, copy=True):
    if not G.is_directed():
        raise nx.NetworkXError("Cannot reverse an undirected graph.")
    else:
        return G.reverse(copy=copy)
Return the reverse directed graph of G.
dataset/ETHPy150Open networkx/networkx/networkx/algorithms/operators/unary.py/reverse