class_docstr: Make sure user-visible error messages look correct.
  
  These errors are a little annoying to test, but they're important! So we
  are testing them word-for-word as much as possible. Even though this
  *feels* like an antipattern, it isn't: we're making sure the codepaths
  that pull useful debug info from the code are working.
code: def test_st_warning_text(self):
      @st.cache
      def st_warning_text_func():
          st.markdown("hi")
  
      st_warning_text_func()
  
      el = self.get_delta_from_queue(-2).new_element
      self.assertEqual(el.exception.type, "CachedStFunctionWarning")
      self.assertEqual(
          normalize_md(el.exception.message),
          normalize_md(
              """
  Your script uses `st.markdown()` or `st.write()` to write to your Streamlit app
  from within some cached code at `st_warning_text_func()`. This code will only be
  called when we detect a cache "miss", which can lead to unexpected results.
  
  How to fix this:
  * Move the `st.markdown()` or `st.write()` call outside `st_warning_text_func()`.
  * Or, if you know what you're doing, use `@st.cache(suppress_st_warning=True)`
  to suppress the warning.
          """
          ),
      )
      self.assertNotEqual(len(el.exception.stack_trace), 0)
      self.assertEqual(el.exception.message_is_markdown, True)
      self.assertEqual(el.exception.is_warning, True)
  
      el = self.get_delta_from_queue(-1).new_element
      self.assertEqual(el.markdown.body, "hi")
  
imports: import threading
  import types
  from unittest.mock import Mock, patch
  from parameterized import parameterized
  import streamlit
  from streamlit.elements import exception
  from streamlit.proto.Exception_pb2 import Exception
  from streamlit.runtime.legacy_caching import caching, hashing
  from tests import testutil
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 1 for calling the CacheErrorsTest obj's underlying member method code with example usage: obj.test_st_warning_text() without return types