code: def MaybeBindCustomConfig(
      inputs: Mapping[str, Any], fn: Any
  ) -> Callable[..., Any]:
      # For compatibility, only bind custom config if it's in the signature.
      if value_utils.FunctionHasArg(fn, labels.CUSTOM_CONFIG):
          custom_config_json = value_utils.GetSoleValue(
              inputs, labels.CUSTOM_CONFIG
          )
          custom_config = (
              json_utils.loads(custom_config_json)
              if custom_config_json
              else {}
          ) or {}
          fn = functools.partial(fn, custom_config=custom_config)
      return fn
  
file_path: tfx/tfx/components/transform/executor_utils.py
imports: import functools
  import os
  from typing import Any, Callable, Dict, List, Mapping, Optional, Sequence
  from absl import logging
  from tfx import types
  from tfx.components.transform import labels
  from tfx.components.util import value_utils
  from tfx.proto import transform_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_component_specs
  from tfx.utils import json_utils
  from tfx.utils import proto_utils
label_desc: Use image node_id 1 for calling a global function with example usage: MaybeBindCustomConfig(inputs, fn) and returns: fn