class_docstr: Subclasses ScriptRunner to provide some testing features.
class_docstr_tok: ["Subclasses","ScriptRunner","to","provide","some","testing","features","."]
docstr: Wait for the script thread to finish, if it is running.
docstr_tok: ["Wait","for","the","script","thread","to","finish",",","if","it","is","running","."]
code: def join(self) -> None:
      """Wait for the script thread to finish, if it is running."""
      if self._script_thread is not None:
          self._script_thread.join()
  
imports: from __future__ import annotations
  import os
  import time
  from typing import Any
  from urllib import parse
  from streamlit import runtime
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
  from streamlit.proto.WidgetStates_pb2 import WidgetStates
  from streamlit.runtime.forward_msg_queue import ForwardMsgQueue
  from streamlit.runtime.memory_uploaded_file_manager import MemoryUploadedFileManager
  from streamlit.runtime.scriptrunner import RerunData, ScriptRunner, ScriptRunnerEvent
  from streamlit.runtime.scriptrunner.script_cache import ScriptCache
  from streamlit.runtime.scriptrunner.script_run_context import ScriptRunContext
  from streamlit.runtime.state.safe_session_state import SafeSessionState
  from streamlit.testing.v1.element_tree import ElementTree, parse_tree_from_messages
label_desc: Use image node_id 2 for calling the LocalScriptRunner obj's underlying member method code with example usage: obj.join() without return types