docstr: Enqueue a ForwardMsg to our browser queue.
  This private function is called by ScriptRunContext only.
  
  It may be called from the script thread OR the main thread.
docstr_tok: ["Enqueue","a","ForwardMsg","to","our","browser","queue",".","This","private","function","is","called","by","ScriptRunContext","only",".","It","may","be","called","from","the","script","thread","OR","the","main","thread","."]
code: def _enqueue_forward_msg(self, msg: ForwardMsg) -> None:
      """Enqueue a ForwardMsg to our browser queue.
      This private function is called by ScriptRunContext only.
  
      It may be called from the script thread OR the main thread.
      """
      # Whenever we enqueue a ForwardMsg, we also handle any pending
      # execution control request. This means that a script can be
      # cleanly interrupted and stopped inside most `st.foo` calls.
      #
      # (If "runner.installTracer" is true, then we'll actually be
      # handling these requests in a callback called after every Python
      # instruction instead.)
      if not config.get_option("runner.installTracer"):
          self._maybe_handle_execution_control_request()
  
      # Pass the message to our associated AppSession.
      self.on_event.send(
          self,
          event=ScriptRunnerEvent.ENQUEUE_FORWARD_MSG,
          forward_msg=msg,
      )
  
imports: import gc
  import sys
  import threading
  import types
  from contextlib import contextmanager
  from enum import Enum
  from timeit import default_timer
  from typing import Callable, Dict, Optional
  from blinker import Signal
  from streamlit import config, runtime, source_util, util
  from streamlit.error_util import handle_uncaught_app_exception
  from streamlit.logger import get_logger
  from streamlit.proto.ClientState_pb2 import ClientState
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
  from streamlit.runtime.scriptrunner.script_cache import ScriptCache
  from streamlit.runtime.scriptrunner.script_requests import RerunData, ScriptRequests, ScriptRequestType
  from streamlit.runtime.scriptrunner.script_run_context import ScriptRunContext, add_script_run_ctx, get_script_run_ctx
  from streamlit.runtime.state import SCRIPT_RUN_WITHOUT_ERRORS_KEY, SafeSessionState, SessionState
  from streamlit.runtime.uploaded_file_manager import UploadedFileManager
  from streamlit.vendor.ipython.modified_sys_path import modified_sys_path
label_desc: Use image node_id 9 for calling the ScriptRunner obj's underlying member method code with example usage: obj._enqueue_forward_msg(msg) without return types