code: def clone(self, ignore=()):
          
          nodes = [
              clone(node, self.substitutions, ignore)
              for node in toposorted(self.nodes, self.edges)
          ]
          return DAG(nodes=nodes, substitutions=self.substitutions).build_edges()
docs: Clone this dag using a set of substitutions.
  
          Traverse the dag in topological order.