class_docstr: UI state tracker; mirrors state from frontend SelectionService.
  
  WARNING: this component is _stateful_, and in current form implements no
  locking or access control. We recommend using this only in a single-user,
  single-threaded context such as IPython or Colab notebooks.
code: def __init__(self):
      self._state = UIState()
  
file_path: lit/lit_nlp/lib/ui_state.py
imports: from typing import Optional
  import attr
  from lit_nlp.api import dataset
  from lit_nlp.api import types
label_desc: Use image node_id 1 to create a new UIStateTracker object from inherited base classes: object with example: obj = UIStateTracker()