code: def save_block_message(
      block_proto: Block,
      invoked_dg_id: str,
      used_dg_id: str,
      returned_dg_id: str,
  ) -> None:
      """Save the message for a block to a thread-local callstack, so it can
      be used later to replay the block when a cache-decorated function's
      execution is skipped.
      """
      CACHE_DATA_MESSAGE_REPLAY_CTX.save_block_message(
          block_proto, invoked_dg_id, used_dg_id, returned_dg_id
      )
      CACHE_RESOURCE_MESSAGE_REPLAY_CTX.save_block_message(
          block_proto, invoked_dg_id, used_dg_id, returned_dg_id
      )
  
file_path: streamlit/lib/streamlit/runtime/caching/__init__.py
imports: import contextlib
  from typing import Any, Iterator, Union
  from google.protobuf.message import Message
  from streamlit.proto.Block_pb2 import Block
  from streamlit.runtime.caching.cache_data_api import CACHE_DATA_MESSAGE_REPLAY_CTX, CacheDataAPI, _data_caches
  from streamlit.runtime.caching.cache_errors import CACHE_DOCS_URL
  from streamlit.runtime.caching.cache_resource_api import CACHE_RESOURCE_MESSAGE_REPLAY_CTX, CacheResourceAPI, _resource_caches
  from streamlit.runtime.state.common import WidgetMetadata
  from streamlit.runtime.caching.cache_data_api import get_data_cache_stats_provider
  from streamlit.runtime.caching.cache_resource_api import get_resource_cache_stats_provider
label_desc: Use image node_id 2 for calling a global function with example usage: save_block_message(block_proto, invoked_dg_id, used_dg_id, returned_dg_id) without return types