code: def _get_text(text: Optional[str]) -> Optional[str]:
      if text is None:
          return None
      if isinstance(text, str):
          return clean_text(text)
      raise StreamlitAPIException(
          f"Progress Text is of type {str(type(text))}, which is not an accepted type."
          "Text only accepts: str. Please convert the text to an accepted type."
      )
  
file_path: streamlit/lib/streamlit/elements/progress.py
imports: from typing import TYPE_CHECKING, Optional, Union, cast
  from typing_extensions import TypeAlias
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.Progress_pb2 import Progress
  from streamlit.string_util import clean_text
label_desc: Use image node_id 2 for calling a global function with example usage: _get_text(text) and returns: None, clean_text