def clone(self, ignore=()):
        """
        Clone this dag using a set of substitutions.

        Traverse the dag in topological order.

        """
        nodes = [
            clone(node, self.substitutions, ignore)
            for node in toposorted(self.nodes, self.edges)
        ]
        return DAG(nodes=nodes, substitutions=self.substitutions).build_edges()
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 ( )
Clone this dag using a set of substitutions.

        Traverse the dag in topological order.