code: def walk(self, walk_func):
          
          nodes = self.topological_sort()
          # Reverse so we start with nodes that have no dependencies.
          nodes.reverse()
  
          for n in nodes:
              walk_func(n)
docs: Walks each node of the graph in reverse topological order.
          This can be used to perform a set of operations, where the next
          operation depends on the previous operation. It's important to note
          that walking happens serially, and is not paralellized.
  
          Args:
              walk_func (:class:`types.FunctionType`): The function to be called
                  on each node of the graph.