code: def __init__(
      self,
      cache_type: CacheType,
      cached_func: types.FunctionType,
  ):
      func_name = get_cached_func_name_md(cached_func)
      decorator_name = get_decorator_api_name(cache_type)
  
      msg = (
          f"""
  While running {func_name}, a streamlit element is called on some layout block created outside the function.
  This is incompatible with replaying the cached effect of that element, because the
  the referenced block might not exist when the replay happens.
  
  How to fix this:
  * Move the creation of $THING inside {func_name}.
  * Move the call to the streamlit element outside of {func_name}.
  * Remove the `@st.{decorator_name}` decorator from {func_name}.
              """
      ).strip("\n")
  
      super().__init__(msg)
  
imports: import types
  from typing import Any, Optional
  from streamlit import type_util
  from streamlit.errors import MarkdownFormattedException, StreamlitAPIException, StreamlitAPIWarning
  from streamlit.runtime.caching.cache_type import CacheType, get_decorator_api_name
label_desc: Use image node_id 1 to create a new CacheReplayClosureError object from inherited base classes: StreamlitAPIException with example: obj = CacheReplayClosureError(cache_type, cached_func)