code: def test_invalid_pipeline_depended_on_fail_step(
      sagemaker_session, role, pipeline_name
  ):
      param = ParameterInteger(name="MyInt", default_value=2)
      cond = ConditionEquals(left=param, right=1)
      step_fail = FailStep(
          name="FailStep",
          error_message="Failed pipeline execution",
      )
      step_cond = ConditionStep(
          name="CondStep",
          conditions=[cond],
          if_steps=[],
          else_steps=[],
          depends_on=["FailStep"],
      )
      pipeline = Pipeline(
          name=pipeline_name,
          steps=[step_cond, step_fail],
          sagemaker_session=sagemaker_session,
          parameters=[param],
      )
  
      try:
          with pytest.raises(Exception) as error:
              pipeline.create(role)
  
          assert "CondStep can not depends on FailStep" in str(
              error.value
          )
      finally:
          try:
              pipeline.delete()
          except Exception:
              pass
  
file_path: sagemaker-python-sdk/tests/integ/sagemaker/workflow/test_fail_steps.py
imports: from __future__ import absolute_import
  import pytest
  from tests.integ.sagemaker.workflow.helpers import wait_pipeline_execution
  from sagemaker import get_execution_role, utils
  from sagemaker.workflow.condition_step import ConditionStep
  from sagemaker.workflow.conditions import ConditionEquals, ConditionNot
  from sagemaker.workflow.fail_step import FailStep
  from sagemaker.workflow.functions import Join
  from sagemaker.workflow.parameters import ParameterInteger, ParameterString
  from sagemaker.workflow.pipeline import Pipeline
label_desc: Use image node_id 7 for calling a global function with example usage: test_invalid_pipeline_depended_on_fail_step(sagemaker_session, role, pipeline_name) without return types