code: def _make_widget_key(
      widgets: list[tuple[str, Any]], cache_type: CacheType
  ) -> str:
      """Generate a key for the given list of widgets used in a cache-decorated function.
  
      Keys are generated by hashing the IDs and values of the widgets in the given list.
      """
      func_hasher = hashlib.new("md5", **HASHLIB_KWARGS)
      for widget_id_val in widgets:
          update_hash(widget_id_val, func_hasher, cache_type)
  
      return func_hasher.hexdigest()
  
imports: from __future__ import annotations
  import contextlib
  import hashlib
  import threading
  import types
  from dataclasses import dataclass
  from typing import TYPE_CHECKING, Any, Iterator, Union
  from google.protobuf.message import Message
  from typing_extensions import Protocol, runtime_checkable
  import streamlit
  from streamlit import runtime, util
  from streamlit.elements import NONWIDGET_ELEMENTS, WIDGETS
  from streamlit.logger import get_logger
  from streamlit.proto.Block_pb2 import Block
  from streamlit.runtime.caching.cache_errors import CachedStFunctionWarning, CacheReplayClosureError
  from streamlit.runtime.caching.cache_type import CacheType
  from streamlit.runtime.caching.hashing import update_hash
  from streamlit.runtime.scriptrunner.script_run_context import ScriptRunContext, get_script_run_ctx
  from streamlit.runtime.state.common import WidgetMetadata
  from streamlit.util import HASHLIB_KWARGS
label_desc: Use image node_id 2 for calling a global function with example usage: _make_widget_key(widgets, cache_type) and returns: func_hasher