code: def test_two_steps_emr_pipeline(
      sagemaker_session, role, pipeline_name, region_name
  ):
      instance_count = ParameterInteger(
          name="InstanceCount", default_value=2
      )
  
      emr_step_config = EMRStepConfig(
          jar="s3://us-west-2.elasticmapreduce/libs/script-runner/script-runner.jar",
          args=["dummy_emr_script_path"],
      )
  
      step_emr_1 = EMRStep(
          name="emr-step-1",
          cluster_id="j-1YONHTCP3YZKC",
          display_name="emr_step_1",
          description="MyEMRStepDescription",
          step_config=emr_step_config,
      )
  
      step_emr_2 = EMRStep(
          name="emr-step-2",
          cluster_id=step_emr_1.properties.ClusterId,
          display_name="emr_step_2",
          description="MyEMRStepDescription",
          step_config=emr_step_config,
      )
  
      pipeline = Pipeline(
          name=pipeline_name,
          parameters=[instance_count],
          steps=[step_emr_1, step_emr_2],
          sagemaker_session=sagemaker_session,
      )
  
      try:
          response = pipeline.create(role)
          create_arn = response["PipelineArn"]
          assert re.match(
              rf"arn:aws:sagemaker:{region_name}:\d{{12}}:pipeline/{pipeline_name}",
              create_arn,
          )
      finally:
          try:
              pipeline.delete()
          except Exception:
              pass
  
file_path: sagemaker-python-sdk/tests/integ/sagemaker/workflow/test_emr_steps.py
imports: from __future__ import absolute_import
  import re
  import pytest
  from sagemaker import get_execution_role, utils
  from sagemaker.workflow.emr_step import EMRStep, EMRStepConfig
  from sagemaker.workflow.parameters import ParameterInteger
  from sagemaker.workflow.pipeline import Pipeline
label_desc: Use image node_id 4 for calling a global function with example usage: test_two_steps_emr_pipeline(sagemaker_session, role, pipeline_name, region_name) without return types