parameters: (self, graph=None)
return_statement: return new_graph
docstring: Return a new graph with reversed dependencies based
          on current graph.
docstring_summary: Return a new graph with reversed dependencies based
          on current graph.
docstring_tokens: Return a new graph with reversed dependencies based on current graph .
function: def reverse_clone(self, graph=None):
          """
          Return a new graph with reversed dependencies based
          on current graph.
          """
          if graph is None:
              graph = self.graph
  
          new_graph = DAG()
          for key in self.topological_sort(graph):
              new_graph.add_node(key)
  
          for key, value in graph.items():
              for downstream_node in value:
                  new_graph.add_edge(downstream_node, key)
          return new_graph
function_tokens: def reverse_clone ( self , graph = None ) : if graph is None : graph = self . graph new_graph = DAG ( ) for key in self . topological_sort ( graph ) : new_graph . add_node ( key ) for key , value in graph . items ( ) : for downstream_node in value : new_graph . add_edge ( downstream_node , key ) return new_graph