class_docstr: A context object that contains data for a "script run" - that is,
  data that's scoped to a single ScriptRunner execution (and therefore also
  scoped to a single connected "session").
  
  ScriptRunContext is used internally by virtually every `st.foo()` function.
  It is accessed only from the script thread that's created by ScriptRunner,
  or from app-created helper threads that have been "attached" to the
  ScriptRunContext via `add_script_run_ctx`.
  
  Streamlit code typically retrieves the active ScriptRunContext via the
  `get_script_run_ctx` function.
code: def reset(
      self, query_string: str = "", page_script_hash: str = ""
  ) -> None:
      self.cursors = {}
      self.widget_ids_this_run = set()
      self.widget_user_keys_this_run = set()
      self.form_ids_this_run = set()
      self.query_string = query_string
      self.page_script_hash = page_script_hash
      # Permit set_page_config when the ScriptRunContext is reused on a rerun
      self._set_page_config_allowed = True
      self._has_script_started = False
      self.command_tracking_deactivated: bool = False
      self.tracked_commands = []
      self.tracked_commands_counter = collections.Counter()
  
      parsed_query_params = parse.parse_qs(
          query_string, keep_blank_values=True
      )
      with self.session_state.query_params() as qp:
          qp.clear_with_no_forward_msg()
          for key, val in parsed_query_params.items():
              if len(val) == 0:
                  qp.set_with_no_forward_msg(key, val="")
              elif len(val) == 1:
                  qp.set_with_no_forward_msg(key, val=val[-1])
              else:
                  qp.set_with_no_forward_msg(key, val)
  
imports: import collections
  import contextvars
  import threading
  from dataclasses import dataclass, field
  from typing import Callable, Counter, Dict, List, Optional, Set, Tuple
  from urllib import parse
  from typing_extensions import Final, TypeAlias
  from streamlit import runtime
  from streamlit.errors import StreamlitAPIException
  from streamlit.logger import get_logger
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
  from streamlit.proto.PageProfile_pb2 import Command
  from streamlit.runtime.scriptrunner.script_requests import ScriptRequests
  from streamlit.runtime.state import SafeSessionState
  from streamlit.runtime.uploaded_file_manager import UploadedFileManager
  import streamlit
label_desc: Use image node_id 1 for calling the ScriptRunContext obj's underlying member method code with example usage: obj.reset(query_string, page_script_hash) without return types