code: def walk(self, walker):
          
  
          def walk_func(step):
              # Before we execute the step, we need to ensure that it's
              # transitive dependencies are all in an "ok" state. If not, we
              # won't execute this step.
              for dep in self.graph.downstream(step.name):
                  if not dep.ok:
                      step.set_status(FailedStatus("dependency has failed"))
                      return step.ok
  
              return step.run()
  
          return self.graph.walk(walker, walk_func)
docs: Walks each step in the underlying graph, in topological order.
  
          Args:
              walker (func): a walker function to be passed to
                  :class:`stacker.dag.DAG` to walk the graph.