code: def transpose(self):
          
          graph = self.graph
          transposed = DAG()
          for node, edges in graph.items():
              transposed.add_node(node)
          for node, edges in graph.items():
              # for each edge A -> B, transpose it so that B -> A
              for edge in edges:
                  transposed.add_edge(edge, node)
          return transposed
docs: Builds a new graph with the edges reversed.
  
          Returns:
              :class:`stacker.dag.DAG`: The transposed graph.