class_docstr: A lightweight wrapper of a dict that sends forwardMsgs when state changes.
  It stores str keys with str and List[str] values.
class_docstr_tok: ["A","lightweight","wrapper","of","a","dict","that","sends","forwardMsgs","when","state","changes",".","It","stores","str","keys","with","str","and","List","[","str","]","values","."]
code: def __setitem__(
      self, key: str, value: Union[str, Iterable[str]]
  ) -> None:
      if isinstance(value, dict):
          raise StreamlitAPIException(
              f"You cannot set a query params key `{key}` to a dictionary."
          )
  
      if key in EMBED_QUERY_PARAMS_KEYS:
          raise StreamlitAPIException(
              "Query param embed and embed_options (case-insensitive) cannot be set programmatically."
          )
      # Type checking users should handle the string serialization themselves
      # We will accept any type for the list and serialize to str just in case
      if isinstance(value, Iterable) and not isinstance(value, str):
          self._query_params[key] = [str(item) for item in value]
      else:
          self._query_params[key] = str(value)
      self._send_query_param_msg()
  
imports: from dataclasses import dataclass, field
  from typing import Dict, Iterable, Iterator, List, MutableMapping, Union
  from urllib import parse
  from streamlit.constants import EMBED_QUERY_PARAMS_KEYS
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
label_desc: Use image node_id 3 for calling the QueryParams obj's underlying member method code with example usage: obj.__setitem__(key, value) without return types