code: def get_fn(
      exec_properties: Dict[str, Any], fn_name: str
  ) -> Callable[..., Any]:
      """Loads and returns user-defined function."""
      logging.info("udf_utils.get_fn %r %r", exec_properties, fn_name)
  
      has_module_file = bool(exec_properties.get(_MODULE_FILE_KEY))
      has_module_path = bool(exec_properties.get(_MODULE_PATH_KEY))
      has_fn = bool(exec_properties.get(fn_name))
  
      if has_module_path:
          module_path = exec_properties[_MODULE_PATH_KEY]
          return import_utils.import_func_from_module(
              module_path, fn_name
          )
      elif has_module_file:
          if has_fn:
              return import_utils.import_func_from_source(
                  exec_properties[_MODULE_FILE_KEY],
                  exec_properties[fn_name],
              )
          else:
              return import_utils.import_func_from_source(
                  exec_properties[_MODULE_FILE_KEY], fn_name
              )
      elif has_fn:
          fn_path_split = exec_properties[fn_name].split(".")
          return import_utils.import_func_from_module(
              ".".join(fn_path_split[0:-1]), fn_path_split[-1]
          )
      else:
          raise ValueError(
              "Neither module file or user function have been supplied in `exec_properties`."
          )
  
imports: import hashlib
  import os
  import re
  import shutil
  import struct
  import subprocess
  import sys
  import tempfile
  from typing import Any, Callable, Dict, List, Optional, Tuple
  from absl import logging
  from tfx.dsl.components.base import base_component
  from tfx.dsl.io import fileio
  from tfx.utils import import_utils
  from tfx.utils import io_utils
label_desc: Use image node_id 1 for calling a global function with example usage: get_fn(exec_properties, fn_name) and returns: import_utils, import_utils, import_utils, import_utils