code: def test_pipeline_graph_with_delayed_return_acyclic(
      sagemaker_session_mock, job_config
  ):
      step_a = step(
          lambda x, y: x + y,
          name="stepA",
          image_uri="image",
          instance_type="ml.m4.xlarge",
      )(1, 2)
  
      step_b = step(
          lambda x, y: x + y,
          name="stepB",
          image_uri="image",
          instance_type="ml.m4.xlarge",
      )(1, 2)
  
      step_c = step(
          lambda x, y: x + y,
          name="stepC",
          image_uri="image",
          instance_type="ml.m4.xlarge",
      )(1, 2)
  
      get_step(step_c).add_depends_on([step_a])
  
      step_d = step(
          lambda x, y: x + y,
          name="stepD",
          image_uri="image",
          instance_type="ml.m4.xlarge",
      )(1, 2)
      get_step(step_d).add_depends_on([step_c])
  
      step_e = step(
          lambda x, y: x + y,
          name="stepE",
          image_uri="image",
          instance_type="ml.m4.xlarge",
      )(1, 2)
      get_step(step_e).add_depends_on([step_d, step_b, step_a])
  
      # An isolate step node F
      step_f = step(
          lambda x, y: x + y,
          name="stepF",
          image_uri="image",
          instance_type="ml.m4.xlarge",
      )(1, 2)
  
      pipeline = Pipeline(
          name="MyPipeline",
          # Only e and f are leaf nodes but user put b inside the list as well,
          # which is fine
          steps=[step_b, step_e, step_f],
          sagemaker_session=sagemaker_session_mock,
      )
  
      # check the extended step list
      assert len(pipeline.steps) == 3
  
      pipeline_graph = PipelineGraph.from_pipeline(pipeline)
      adjacency_list = pipeline_graph.adjacency_list
      assert ordered(adjacency_list) == ordered(
          {
              "stepA": ["stepC", "stepE"],
              "stepB": ["stepE"],
              "stepC": ["stepD"],
              "stepD": ["stepE"],
              "stepE": [],
              "stepF": [],
          }
      )
      _verify_pipeline_graph_traversal(pipeline_graph)
  
imports: from __future__ import absolute_import
  import pytest
  from sagemaker.remote_function.job import _JobSettings
  from sagemaker.workflow.function_step import step
  from sagemaker.workflow.step_outputs import get_step
  from sagemaker.workflow.pipeline import Pipeline, PipelineGraph
  from sagemaker.workflow.condition_step import ConditionStep
  from sagemaker.workflow.conditions import ConditionEquals, ConditionIn, ConditionNot, ConditionOr, ConditionGreaterThan
  from sagemaker.workflow.execution_variables import ExecutionVariables
  from sagemaker.workflow.parameters import ParameterInteger, ParameterString
  from sagemaker.workflow._steps_compiler import CompiledStep
  from tests.unit.sagemaker.workflow.helpers import ordered, CustomStep, CustomStepCollection
label_desc: Use image node_id 15 for calling a global function with example usage: test_pipeline_graph_with_delayed_return_acyclic(sagemaker_session_mock, job_config) without return types