class_docstr: Class used to compile steps. Should be instantiated once per compilation.
class_docstr_tok: ["Class","used","to","compile","steps",".","Should","be","instantiated","once","per","compilation","."]
docstr: Build a list of steps.
docstr_tok: ["Build","a","list","of","steps","."]
code: def _initialize_queue_and_build(
      self, steps: List[Union[Step, StepCollection, StepOutput]]
  ):
      """Build a list of steps."""
  
      simple_steps = self._simplify_step_list(steps)
      self._push_to_build_queue(simple_steps)
  
      compiled_steps = []
      while len(self._build_queue) > 0:
          step = self._build_queue.pop()
          if isinstance(step, ConditionStep):
              compiled_steps.append(self._build_condition_step(step))
          else:
              compiled_steps.append(self._build_step(step))
  
      self._set_serialize_output_to_json_flag(compiled_steps)
      return compiled_steps
  
imports: from __future__ import absolute_import
  import logging
  import secrets
  from typing import Sequence, Union, List
  from sagemaker.workflow.entities import RequestType
  from sagemaker.workflow.function_step import _FunctionStep
  from sagemaker.workflow.steps import Step, StepTypeEnum, PropertyFile
  from sagemaker.workflow.condition_step import ConditionStep
  from sagemaker.workflow.step_collections import StepCollection
  from sagemaker.workflow.step_outputs import get_step
  from sagemaker.workflow.pipeline_definition_config import PipelineDefinitionConfig
  from sagemaker.workflow.step_outputs import StepOutput
  from sagemaker.workflow.utilities import step_compilation_context_manager, get_config_hash, get_code_hash
  from sagemaker.utils import sagemaker_timestamp
label_desc: Use image node_id 12 for calling the StepsCompiler obj's underlying member method code with example usage: obj._initialize_queue_and_build(steps) and returns: compiled_steps