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: Helper method to create a mapping from Step/Step Collection name to itself.
docstr_tok: ["Helper","method","to","create","a","mapping","from","Step\/Step","Collection","name","to","itself","."]
code: def _generate_step_map(
      steps: Sequence[Union[Step, StepCollection, StepOutput]],
      step_map: dict,
  ):
      """Helper method to create a mapping from Step/Step Collection name to itself."""
      for item in steps:
          if isinstance(item, StepOutput):
              step = get_step(item)
          else:
              step = item
          if step.name in step_map:
              raise ValueError(
                  "Pipeline steps cannot have duplicate names. In addition, steps added in "
                  "the ConditionStep cannot be added in the Pipeline steps list."
              )
          step_map[step.name] = step
          if isinstance(step, ConditionStep):
              StepsCompiler._generate_step_map(
                  step.if_steps + step.else_steps, step_map
              )
          if isinstance(step, StepCollection):
              StepsCompiler._generate_step_map(step.steps, step_map)
  
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 2 for calling the StepsCompiler obj's underlying member method code with example usage: obj._generate_step_map(steps, step_map) without return types