code: def reverse(graph):
      
      rev_graph = [[] for node in graph]
      for node in range(len(graph)):
          for neighbor in graph[node]:
              rev_graph[neighbor].append(node)
      return rev_graph
docs: replace all arcs (u, v) by arcs (v, u) in a graph