code: def pipeline_graph_get_sub_dag(sagemaker_session_mock):
      step_a = CustomStep(name="stepA")
      step_b = CustomStep(name="stepB", depends_on=[step_a])
      step_c = CustomStep(name="stepC", depends_on=[step_b])
      step_d = CustomStep(name="stepD", depends_on=[step_b])
      step_e = CustomStep(name="stepE", depends_on=[step_c])
      step_f = CustomStep(name="stepF", depends_on=[step_c])
      step_g = CustomStep(name="stepG", depends_on=[step_e, step_d])
      step_h = CustomStep(name="stepH", depends_on=[step_g])
      step_i = CustomStepCollection(name="stepI", depends_on=[step_h])
      step_j = CustomStep(name="stepJ", depends_on=[step_h])
  
      pipeline = Pipeline(
          name="MyPipeline",
          steps=[
              step_a,
              step_b,
              step_c,
              step_d,
              step_e,
              step_f,
              step_g,
              step_h,
              step_i,
              step_j,
          ],
          sagemaker_session=sagemaker_session_mock,
      )
  
      return PipelineGraph.from_pipeline(pipeline)
  
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 3 for calling a global function with example usage: pipeline_graph_get_sub_dag(sagemaker_session_mock) and returns: PipelineGraph