parameters: (builder, spec, processed_modules=None)
return_statement: return steps
docstring: Sets `builder` configuration, and returns all the builder steps
      necessary to build `spec` and its dependencies.
  
      Traverses the dependencies in depth-first order, honoring the sequencing
      in each 'depends_on' list.
docstring_summary: Sets `builder` configuration, and returns all the builder steps
      necessary to build `spec` and its dependencies.
docstring_tokens: Sets builder configuration and returns all the builder steps necessary to build spec and its dependencies .
function: def steps_for_spec(builder, spec, processed_modules=None):
      '''
      Sets `builder` configuration, and returns all the builder steps
      necessary to build `spec` and its dependencies.
  
      Traverses the dependencies in depth-first order, honoring the sequencing
      in each 'depends_on' list.
      '''
      if processed_modules is None:
          processed_modules = set()
      steps = []
      for module in spec.get('depends_on', []):
          if module not in processed_modules:
              processed_modules.add(module)
              steps.extend(steps_for_spec(
                  builder,
                  module.fbcode_builder_spec(builder),
                  processed_modules
              ))
      steps.extend(spec.get('steps', []))
      return steps
function_tokens: def steps_for_spec ( builder , spec , processed_modules = None ) : if processed_modules is None : processed_modules = set ( ) steps = [ ] for module in spec . get ( 'depends_on' , [ ] ) : if module not in processed_modules : processed_modules . add ( module ) steps . extend ( steps_for_spec ( builder , module . fbcode_builder_spec ( builder ) , processed_modules ) ) steps . extend ( spec . get ( 'steps' , [ ] ) ) return steps