class_docstr: An interface for communicating with a ScriptRunner. Thread-safe.
  
  AppSession makes requests of a ScriptRunner through this class, and
  ScriptRunner handles those requests.
class_docstr_tok: ["An","interface","for","communicating","with","a","ScriptRunner",".","Thread-safe",".","AppSession","makes","requests","of","a","ScriptRunner","through","this","class",",","and","ScriptRunner","handles","those","requests","."]
code: def __init__(self):
      self._lock = threading.Lock()
      self._state = ScriptRequestType.CONTINUE
      self._rerun_data = RerunData()
  
imports: import threading
  from dataclasses import dataclass
  from enum import Enum
  from typing import Optional, cast
  from streamlit import util
  from streamlit.proto.WidgetStates_pb2 import WidgetStates
  from streamlit.runtime.state import coalesce_widget_states
label_desc: Use image node_id 1 to create a new ScriptRequests object  with example: obj = ScriptRequests()