code: def convert_pipeline_variables_to_pickleable(
      func_args: Tuple, func_kwargs: Dict
  ):
      """Convert pipeline variables to pickleable.
  
      Args:
          func_args: function args.
          func_kwargs: function kwargs.
      """
  
      from sagemaker.workflow.entities import PipelineVariable
  
      from sagemaker.workflow.execution_variables import (
          ExecutionVariables,
      )
  
      from sagemaker.workflow.function_step import DelayedReturn
  
      # Notes:
      # 1. The s3_base_uri = s3_root_uri + pipeline_name, but the two may be unknown
      # when defining function steps. After step-level arg serialization,
      # it's hard to update the s3_base_uri in pipeline compile time.
      # Thus set a placeholder: _S3BaseUriIdentifier, and let the runtime job to resolve it.
      # 2. For saying s3_root_uri is unknown, it's because when defining function steps,
      # the pipeline's sagemaker_session is not passed in, but the default s3_root_uri
      # should be retrieved from the pipeline's sagemaker_session.
      def convert(arg):
          if isinstance(arg, DelayedReturn):
              return _DelayedReturn(
                  uri=[
                      _S3BaseUriIdentifier(),
                      ExecutionVariables.PIPELINE_EXECUTION_ID._pickleable,
                      arg._step.name,
                      "results",
                  ],
                  reference_path=arg._reference_path,
              )
  
          if isinstance(arg, PipelineVariable):
              return arg._pickleable
  
          return arg
  
      converted_func_args = tuple(convert(arg) for arg in func_args)
      converted_func_kwargs = {
          key: convert(arg) for key, arg in func_kwargs.items()
      }
  
      return converted_func_args, converted_func_kwargs
  
imports: from __future__ import absolute_import
  from concurrent.futures import ThreadPoolExecutor
  from dataclasses import dataclass, field
  from typing import Any, Union, Dict, List, Tuple
  from sagemaker.s3 import s3_path_join
  from sagemaker.remote_function.core.serialization import deserialize_obj_from_s3
label_desc: Use image node_id 3 for calling a global function with example usage: convert_pipeline_variables_to_pickleable(func_args, func_kwargs) and returns: converted_func_args,  converted_func_kwargs, arg, _DelayedReturn, arg