code: def test_main_success_with_pipeline_context(
      _get_sagemaker_session,
      mock_stored_function,
      _exit_process,
      _load_run_object,
      args,
  ):
      os.environ["REMOTE_FUNCTION_SECRET_KEY"] = TEST_HMAC_KEY
  
      args_input, expected_serialize_output_to_json = args
      invoke_function.main(args_input)
  
      _get_sagemaker_session.assert_called_with(TEST_REGION)
      mock_stored_function.assert_called_with(
          sagemaker_session=ANY,
          s3_base_uri=TEST_S3_BASE_URI,
          s3_kms_key=TEST_S3_KMS_KEY,
          hmac_key=TEST_HMAC_KEY,
          context=Context(
              execution_id=TEST_EXECUTION_ID,
              step_name=TEST_STEP_NAME,
              property_references={
                  "Parameter.a": "1.0",
                  "Parameter.b": "2.0",
              },
              serialize_output_to_json=expected_serialize_output_to_json,
              func_step_s3_dir=FUNC_STEP_S3_DIR,
          ),
      )
      _load_run_object.assert_not_called()
      _exit_process.assert_called_with(0)
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/remote_function/test_invoke_function.py
imports: from __future__ import absolute_import
  import os
  import pytest
  from mock import patch, Mock, ANY
  from sagemaker.remote_function import invoke_function
  from sagemaker.remote_function.errors import SerializationError
  from sagemaker.remote_function.core.pipeline_variables import Context
  from sagemaker.utils import sagemaker_timestamp
label_desc: Use image node_id 7 for calling a global function with example usage: test_main_success_with_pipeline_context(_get_sagemaker_session, mock_stored_function, _exit_process, _load_run_object, args) without return types