code: def test_fail_step_with_join_fn_in_error_message():
      param = ParameterInteger(name="MyInt", default_value=2)
      cond = ConditionEquals(left=param, right=1)
      step_cond = ConditionStep(
          name="CondStep",
          conditions=[cond],
          if_steps=[],
          else_steps=[],
      )
      step_fail = FailStep(
          name="FailStep",
          error_message=Join(
              on=": ",
              values=[
                  "Failed due to xxx == yyy returns",
                  step_cond.properties.Outcome,
              ],
          ),
      )
      pipeline = Pipeline(
          name="MyPipeline",
          steps=[step_cond, step_fail],
          parameters=[param],
      )
  
      _expected_dsl = [
          {
              "Name": "CondStep",
              "Type": "Condition",
              "Arguments": {
                  "Conditions": [
                      {
                          "Type": "Equals",
                          "LeftValue": {"Get": "Parameters.MyInt"},
                          "RightValue": 1,
                      }
                  ],
                  "IfSteps": [],
                  "ElseSteps": [],
              },
          },
          {
              "Name": "FailStep",
              "Type": "Fail",
              "Arguments": {
                  "ErrorMessage": {
                      "Std:Join": {
                          "On": ": ",
                          "Values": [
                              "Failed due to xxx == yyy returns",
                              {"Get": "Steps.CondStep.Outcome"},
                          ],
                      }
                  }
              },
          },
      ]
  
      assert json.loads(pipeline.definition())["Steps"] == _expected_dsl
      adjacency_list = PipelineGraph.from_pipeline(
          pipeline
      ).adjacency_list
      assert ordered(adjacency_list) == ordered(
          {"CondStep": ["FailStep"], "FailStep": []}
      )
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/workflow/test_fail_step.py
imports: from __future__ import absolute_import
  import json
  import pytest
  from sagemaker.workflow.condition_step import ConditionStep
  from sagemaker.workflow.conditions import ConditionEquals
  from sagemaker.workflow.fail_step import FailStep
  from sagemaker.workflow.functions import Join
  from sagemaker.workflow.parameters import ParameterInteger
  from sagemaker.workflow.pipeline import Pipeline, PipelineGraph
  from tests.unit.sagemaker.workflow.helpers import ordered
label_desc: Use image node_id 3 for calling a global function with example usage: test_fail_step_with_join_fn_in_error_message() without return types