code: def test_decorator_step_failed(
      sagemaker_session,
      role,
      pipeline_name,
      region_name,
      dummy_container_without_error,
  ):
      os.environ["AWS_DEFAULT_REGION"] = region_name
  
      @step(
          role=role,
          image_uri=dummy_container_without_error,
          instance_type=INSTANCE_TYPE,
          keep_alive_period_in_seconds=60,
      )
      def divide(x, y):
          return x / y
  
      step_a = divide(10, 0)
  
      pipeline = Pipeline(
          name=pipeline_name,
          steps=[step_a],
          sagemaker_session=sagemaker_session,
      )
  
      try:
          execution, execution_steps = create_and_execute_pipeline(
              pipeline=pipeline,
              pipeline_name=pipeline_name,
              region_name=region_name,
              role=role,
              no_of_steps=1,
              last_step_name="divide",
              execution_parameters=dict(),
              step_status="Failed",
          )
  
          step_name = execution_steps[0]["StepName"]
          with pytest.raises(RemoteFunctionError) as e:
              execution.result(step_name)
              assert (
                  f"step {step_name} is not in Completed status."
                  in str(e)
              )
      finally:
          try:
              pipeline.delete()
          except Exception:
              pass
  
imports: from __future__ import absolute_import
  import json
  import numpy
  import pytest
  import os
  import random
  from sagemaker import get_execution_role, utils
  from sagemaker.config import load_sagemaker_config
  from sagemaker.processing import ProcessingInput
  from sagemaker.remote_function.errors import RemoteFunctionError
  from sagemaker.sklearn import SKLearnProcessor
  from sagemaker.remote_function.core.serialization import CloudpickleSerializer
  from sagemaker.s3 import S3Uploader
  from sagemaker.s3_utils import s3_path_join
  from sagemaker.workflow.conditions import ConditionLessThan
  from sagemaker.workflow.fail_step import FailStep
  from sagemaker.workflow.function_step import step
  from sagemaker.workflow.condition_step import ConditionStep
  from sagemaker.workflow.conditions import ConditionEquals
  from sagemaker.workflow.pipeline import Pipeline
  from sagemaker.workflow.parameters import ParameterString, ParameterInteger, ParameterFloat, ParameterBoolean
  from sagemaker.workflow.step_outputs import get_step
  from sagemaker.workflow.steps import ProcessingStep
  from tests.integ.sagemaker.workflow.helpers import create_and_execute_pipeline, wait_pipeline_execution
  from tests.integ import DATA_DIR
label_desc: Use image node_id 13 for calling a global function with example usage: test_decorator_step_failed(sagemaker_session, role, pipeline_name, region_name, dummy_container_without_error) and returns: unknown