code: def test_notebook_job_depend_on_function_step(
      sagemaker_session, dummy_container_without_error
  ):
      pipeline_name = name_from_base(PIPELINE_NAME, max_length=63)
      notebook_job_name_base = (
          f"{NOTEBOOK_JOB_NAME_Prefix}-case4-depend-on"
      )
  
      tags = {
          "sagemaker:user-profile-name": "studio-user",
          "sagemaker:is-scheduling-notebook-job": "true",
      }
  
      @step(
          role=SAGE_MAKER_ROLE_NAME,
          instance_type="ml.m5.large",
          keep_alive_period_in_seconds=60,
          image_uri=dummy_container_without_error,
      )
      def get_env_value():
          """return a static string"""
          return "env_value_from_function_step"
  
      env_value = get_env_value()
  
      input_notebook = (
          "tests/data/workflow/notebook_job_step/simple.ipynb"
      )
      notebook_job_step1 = NotebookJobStep(
          name=f"{STEP_NAME}-1",
          display_name=DISPLAY_NAME,
          description=DESCRIPTION,
          notebook_job_name=f"{notebook_job_name_base}-a",
          input_notebook=input_notebook,
          image_uri=COSMOS_IMAGE_V0_URI,
          kernel_name=KERNEL_NAME,
          role=SAGE_MAKER_ROLE_NAME,
          tags=tags,
          environment_variables={"env_key": env_value},
      )
  
      # TODO - will be removed when cosmos image is ready
      notebook_job_step1 = (
          _config_manual_dependency_installation_short_term_workaround(
              notebook_job_step1
          )
      )
  
      pipeline = Pipeline(
          name=pipeline_name,
          steps=[env_value, notebook_job_step1],
          sagemaker_session=sagemaker_session,
      )
  
      logging.info(
          f"Notebook job step test pipeline definition: {pipeline.definition()}"
      )
  
      try:
          pipeline.create(get_role(sagemaker_session))
          execution_steps = _start_and_verify_execution_with_retry(
              pipeline=pipeline,
              parameters={},
          )
  
          job_description1 = None
          for execution_step in execution_steps:
              if execution_step["StepName"] == f"{STEP_NAME}-1":
                  job_description1 = _get_training_job_details(
                      execution_step, sagemaker_session
                  )
  
          # verify the output of function step is in notebook job's training job def
          assert (
              job_description1["Environment"]["env_key"]
              == "env_value_from_function_step"
          )
      finally:
          try:
              pipeline.delete()
          except Exception as error:
              logging.error(error)
  
imports: from __future__ import absolute_import
  import os.path
  import tarfile
  import logging
  import nbformat
  import pytest
  from sagemaker import get_execution_role
  from sagemaker.s3 import S3Downloader
  from sagemaker.s3_utils import s3_path_join
  from sagemaker.utils import name_from_base
  from sagemaker.workflow import ParameterString
  from sagemaker.workflow.notebook_job_step import NotebookJobStep
  from sagemaker.workflow.parameters import ParameterInteger, ParameterBoolean
  from sagemaker.workflow.pipeline import Pipeline
  from sagemaker.utils import _tmpdir
  from tests.integ.retry import retries
  from tests.integ.sagemaker.workflow.helpers import wait_pipeline_execution
  from tests.integ import kms_utils
  from sagemaker.workflow.function_step import step
label_desc: Use image node_id 4 for calling a global function with example usage: test_notebook_job_depend_on_function_step(sagemaker_session, dummy_container_without_error) and returns: str