code: def test_compile_steps_with_explicit_dependencies():
      # a diamond graph
      step_0 = CustomStep(name="custom-step-0")
      step_1 = CustomStep(name="custom-step-1")
      step_1.add_depends_on([step_0])
      step_2 = CustomStep(name="custom-step-2")
      step_2.add_depends_on([step_0])
      step_3 = CustomStep(name="custom-step-3")
      step_3.add_depends_on([step_1, step_2])
  
      compiler = StepsCompiler(
          pipeline_name="test-pipeline",
          sagemaker_session=None,
          pipeline_definition_config=None,
          steps=[step_3],
      )
      compiled_steps = compiler.build()
  
      assert list_to_request(compiled_steps) == [
          {
              "Name": "custom-step-3",
              "Type": "Training",
              "DependsOn": ["custom-step-1", "custom-step-2"],
              "Arguments": {
                  "Output": "s3://bucket/test-pipeline/custom-step-3",
              },
          },
          {
              "Name": "custom-step-1",
              "Type": "Training",
              "DependsOn": ["custom-step-0"],
              "Arguments": {
                  "Output": "s3://bucket/test-pipeline/custom-step-1",
              },
          },
          {
              "Name": "custom-step-2",
              "Type": "Training",
              "DependsOn": ["custom-step-0"],
              "Arguments": {
                  "Output": "s3://bucket/test-pipeline/custom-step-2",
              },
          },
          {
              "Name": "custom-step-0",
              "Type": "Training",
              "Arguments": {
                  "Output": "s3://bucket/test-pipeline/custom-step-0",
              },
          },
      ]
  
imports: from __future__ import absolute_import
  import pytest
  from sagemaker.workflow.steps import Step, StepTypeEnum
  from sagemaker.workflow.function_step import step
  from sagemaker.workflow.step_collections import StepCollection
  from sagemaker.workflow.condition_step import ConditionStep
  from sagemaker.workflow.conditions import ConditionEquals
  from sagemaker.workflow.properties import Properties
  from sagemaker.workflow.pipeline_definition_config import PipelineDefinitionConfig
  from sagemaker.workflow._steps_compiler import StepsCompiler
  from sagemaker.workflow.utilities import load_step_compilation_context, list_to_request
label_desc: Use image node_id 1 for calling a global function with example usage: test_compile_steps_with_explicit_dependencies() without return types