code: def _load_pipeline_context(args) -> Context:
      """Load pipeline build or run context into context object"""
  
      pipeline_step_name = args.pipeline_step_name
      pipeline_execution_id = args.pipeline_execution_id
      property_references = args.property_references
      serialize_output_to_json = args.serialize_output_to_json
      func_step_s3_dir = args.func_step_s3_dir
  
      property_references_dict = {}
      for i in range(0, len(property_references), 2):
          property_references_dict[
              property_references[i]
          ] = property_references[i + 1]
      return Context(
          step_name=pipeline_step_name,
          execution_id=pipeline_execution_id,
          property_references=property_references_dict,
          serialize_output_to_json=serialize_output_to_json,
          func_step_s3_dir=func_step_s3_dir,
      )
  
file_path: sagemaker-python-sdk/src/sagemaker/remote_function/invoke_function.py
imports: from __future__ import absolute_import
  import argparse
  import sys
  import json
  import os
  from typing import TYPE_CHECKING
  import boto3
  from sagemaker.remote_function.job import KEY_EXPERIMENT_NAME, KEY_RUN_NAME
  from sagemaker.session import Session
  from sagemaker.s3 import s3_path_join
  from sagemaker.remote_function.errors import handle_error
  from sagemaker.remote_function import logging_config
  from sagemaker.remote_function.core.pipeline_variables import Context
label_desc: Use image node_id 4 for calling a global function with example usage: _load_pipeline_context(args) and returns: Context