code: def trim_request_dict(request_dict, job_key, config):
      """Trim request_dict for unwanted fields to not persist them in step arguments
  
      Trim the job_name field off request_dict in cases where we do not want to include it
      in the pipeline definition.
  
      Args:
          request_dict (dict): A dictionary used to build the arguments for a pipeline step,
              containing fields that will be passed to job client during orchestration.
          job_key (str): The key in a step's arguments to look up the base_job_name if it
              exists
          config (_pipeline_config) The config intercepted and set for a pipeline via the
              context manager
      """
  
      if (
          not config
          or not config.pipeline_definition_config.use_custom_job_prefix
      ):
          logger.warning(DEF_CONFIG_WARN_MSG_TEMPLATE, job_key)
          request_dict.pop(
              job_key, None
          )  # safely return null in case of KeyError
      else:
          if job_key in request_dict:
              request_dict[job_key] = base_from_name(
                  request_dict[job_key]
              )  # trim timestamp
  
      return request_dict
  
imports: from __future__ import absolute_import
  import inspect
  import logging
  from functools import wraps
  from pathlib import Path
  from typing import List, Sequence, Union, Set, TYPE_CHECKING, Optional
  import hashlib
  from urllib.parse import unquote, urlparse
  from contextlib import contextmanager
  from _hashlib import HASH
  from sagemaker.utils import base_from_name
  from sagemaker.workflow.parameters import Parameter
  from sagemaker.workflow.pipeline_context import _StepArguments, _PipelineConfig
  from sagemaker.workflow.entities import Entity, RequestType
  from sagemaker.workflow.pipeline_definition_config import PipelineDefinitionConfig
label_desc: Use image node_id 18 for calling a global function with example usage: trim_request_dict(request_dict, job_key, config) and returns: request_dict