code: def _walk_factory(self, dep_predicate):
      
      walk = None
      if dep_predicate:
        walk = self.DepPredicateWalk(dep_predicate)
      else:
        walk = self.NoDepPredicateWalk()
      return walk
docs: Construct the right context object for managing state during a transitive walk.