code: def get_training_code_hash(
      entry_point: str, source_dir: str, dependencies: List[str]
  ) -> str:
      """Get the hash of a training step's code artifact(s).
  
      Args:
          entry_point (str): The absolute or relative path to the local Python
                  source file that should be executed as the entry point to
                  training
          source_dir (str): Path to a directory with any other training source
                  code dependencies aside from the entry point file
          dependencies (str): A list of paths to directories (absolute
                  or relative) with any additional libraries that will be exported
                  to the container
      Returns:
          str: A hash string representing the unique code artifact(s) for the step
      """
      from sagemaker.workflow import is_pipeline_variable
  
      if not is_pipeline_variable(
          source_dir
      ) and not is_pipeline_variable(entry_point):
          if source_dir:
              source_dir_url = urlparse(source_dir)
              if (
                  source_dir_url.scheme == ""
                  or source_dir_url.scheme == "file"
              ):
                  return hash_files_or_dirs([source_dir] + dependencies)
          elif entry_point:
              entry_point_url = urlparse(entry_point)
              if (
                  entry_point_url.scheme == ""
                  or entry_point_url.scheme == "file"
              ):
                  return hash_files_or_dirs(
                      [entry_point] + dependencies
                  )
      return None
  
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 7 for calling a global function with example usage: get_training_code_hash(entry_point, source_dir, dependencies) and returns: None, hash_files_or_dirs, hash_files_or_dirs