def reverse(G, copy=True):
    if not G.is_directed():
        raise nx.NetworkXError("Cannot reverse an undirected graph.")
    else:
        return G.reverse(copy=copy)
Call REST API and handle exceptions
dataset/ETHPy150Open networkx/networkx/networkx/algorithms/operators/unary.py/reverse--crossover with--dataset/ETHPy150Open django-salesforce/django-salesforce/salesforce/backend/query.py/handle_api_exceptions