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 step.
docstr_tok: ["Build","a","step","."]
code: def _build_step(self, step: Step) -> CompiledStep:
      """Build a step."""
  
      with step_compilation_context_manager(
          pipeline_name=self.pipeline_name,
          step_name=step.name,
          sagemaker_session=self.sagemaker_session,
          code_hash=get_code_hash(step),
          config_hash=get_config_hash(step),
          pipeline_definition_config=self.pipeline_definition_config,
          upload_runtime_scripts=self.upload_runtime_scripts,
          upload_workspace=self.upload_workspace,
          pipeline_build_time=self.pipeline_build_time,
          function_step_secret_token=self._function_step_secret_token,
      ) as context:
          request_dict = step.to_request()
  
          self.upload_runtime_scripts = context.upload_runtime_scripts
          self.upload_workspace = context.upload_workspace
  
          depends_on, upstream_steps_in_args = self._get_upstream_steps(
              step, request_dict["Arguments"]
          )
          if depends_on:
              request_dict["DependsOn"] = [s.name for s in depends_on]
  
          self._push_to_build_queue(depends_on)
          self._push_to_build_queue(upstream_steps_in_args)
      return CompiledStep(request_dict)
  
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 9 for calling the StepsCompiler obj's underlying member method code with example usage: obj._build_step(step) and returns: CompiledStep