code: def test_compile_pipeline_with_function_steps(
      sagemaker_session, role, pipeline_name, region_name
  ):
      @step(
          name="generate",
          role=role,
          instance_type=INSTANCE_TYPE,
      )
      def generate():
          """adds two numbers"""
          return random.randint(0, 100)
  
      @step(
          name="print",
          role=role,
          instance_type=INSTANCE_TYPE,
      )
      def print_result(result):
          print(result)
  
      generated = generate()
      conditional_print = ConditionStep(
          name="condition-step",
          # TODO: replace with the generated result
          conditions=[ConditionEquals(left=1, right=1)],
          if_steps=[print_result(generated)],
      )
  
      pipeline = Pipeline(
          name=pipeline_name,
          sagemaker_session=sagemaker_session,
          steps=[generated, conditional_print],
      )
  
      try:
          pipeline.create(role_arn=role)
  
          # verify the artifacts are uploaded to the location specified by sagemaker_session
          assert (
              len(
                  sagemaker_session.list_s3_files(
                      sagemaker_session.default_bucket(),
                      f"{sagemaker_session.default_bucket_prefix}/{pipeline_name}/generate",
                  )
              )
              > 0
          )
  
          assert (
              len(
                  sagemaker_session.list_s3_files(
                      sagemaker_session.default_bucket(),
                      f"{sagemaker_session.default_bucket_prefix}/{pipeline_name}/print",
                  )
              )
              > 0
          )
      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 4 for calling a global function with example usage: test_compile_pipeline_with_function_steps(sagemaker_session, role, pipeline_name, region_name) and returns: random