class_docstr: A stateless singleton that proxies `st.session_state` interactions
  to the current script thread's SessionState instance.
  
  The proxy API differs slightly from SessionState: it does not allow
  callers to get, set, or iterate over "keyless" widgets (that is, widgets
  that were created without a user_key, and have autogenerated keys).
docstr: Set the value of the given key.
  
  Raises
  ------
  StreamlitAPIException
      If the key is not a valid SessionState user key.
docstr_tok: ["Set","the","value","of","the","given","key",".","Raises","--","--","--","StreamlitAPIException","If","the","key","is","not","a","valid","SessionState","user","key","."]
code: def __setitem__(self, key: Key, value: Any) -> None:
      """Set the value of the given key.
  
      Raises
      ------
      StreamlitAPIException
          If the key is not a valid SessionState user key.
      """
      key = str(key)
      require_valid_user_key(key)
      get_session_state()[key] = value
  
imports: from typing import Any, Dict, Iterator, MutableMapping
  from typing_extensions import Final
  from streamlit import logger
  from streamlit import runtime
  from streamlit.runtime.metrics_util import gather_metrics
  from streamlit.runtime.state.common import require_valid_user_key
  from streamlit.runtime.state.safe_session_state import SafeSessionState
  from streamlit.runtime.state.session_state import SessionState
  from streamlit.type_util import Key
label_desc: Use image node_id 5 for calling the SessionStateProxy obj's underlying member method code with example usage: obj.__setitem__(key, value) without return types