code: def _make_function_key(
      cache_type: CacheType, func: types.FunctionType
  ) -> str:
      """Create the unique key for a function's cache.
  
      A function's key is stable across reruns of the app, and changes when
      the function's source code changes.
      """
      func_hasher = hashlib.new("md5", **HASHLIB_KWARGS)
  
      # Include the function's __module__ and __qualname__ strings in the hash.
      # This means that two identical functions in different modules
      # will not share a hash; it also means that two identical *nested*
      # functions in the same module will not share a hash.
      update_hash(
          (func.__module__, func.__qualname__),
          hasher=func_hasher,
          cache_type=cache_type,
          hash_source=func,
      )
  
      # Include the function's source code in its hash. If the source code can't
      # be retrieved, fall back to the function's bytecode instead.
      source_code: str | bytes
      try:
          source_code = inspect.getsource(func)
      except OSError as e:
          _LOGGER.debug(
              "Failed to retrieve function's source code when building its key; falling back to bytecode. err={0}",
              e,
          )
          source_code = func.__code__.co_code
  
      update_hash(
          source_code,
          hasher=func_hasher,
          cache_type=cache_type,
          hash_source=func,
      )
  
      cache_key = func_hasher.hexdigest()
      return cache_key
  
imports: from __future__ import annotations
  import functools
  import hashlib
  import inspect
  import math
  import threading
  import time
  import types
  from abc import abstractmethod
  from collections import defaultdict
  from datetime import timedelta
  from typing import Any, Callable, overload
  from typing_extensions import Literal
  from streamlit import type_util
  from streamlit.elements.spinner import spinner
  from streamlit.logger import get_logger
  from streamlit.runtime.caching.cache_errors import BadTTLStringError, CacheError, CacheKeyNotFoundError, UnevaluatedDataFrameError, UnhashableParamError, UnhashableTypeError, UnserializableReturnValueError, get_cached_func_name_md
  from streamlit.runtime.caching.cache_type import CacheType
  from streamlit.runtime.caching.cached_message_replay import CachedMessageReplayContext, CachedResult, MsgData, replay_cached_messages
  from streamlit.runtime.caching.hashing import HashFuncsDict, update_hash
  from streamlit.util import HASHLIB_KWARGS
label_desc: Use image node_id 6 for calling a global function with example usage: _make_function_key(cache_type, func) and returns: cache_key