      def __init__(self, session_id: int, data_points: int) -> None:
          logger.debug("Initializing: %s: (session_id: %s, data_points: %s)",
                       self.__class__.__name__, session_id, data_points)
          super().__init__()
          self._thread: Optional[LongRunningTask] = None  # Thread for loading data in background
          self._default_view = "avg" if data_points > 1000 else "smoothed"
          self._session_id = None if session_id == "Total" else int(session_id)
  
          self._graph_frame = ttk.Frame(self)
          self._graph: Optional[SessionGraph] = None
 
</s> remove         self._graph: Optional[SessionGraph] = None
        self._display_data: Optional[Calculations] = None
 </s> add         self._graph: SessionGraph | None = None
        self._display_data: Calculations | None = None </s> remove         retval: Dict[int, np.ndarray] = {}
 </s> add         retval: dict[int, np.ndarray] = {} </s> remove         self._thread: Optional[LongRunningTask] = None  # Thread for LongRunningTask
        self._displayed_keys: List[str] = []
 </s> add         self._thread: LongRunningTask | None = None  # Thread for LongRunningTask
        self._displayed_keys: list[str] = [] </s> remove         self._image: Optional["np.ndarray"] = image
        self._image_shape = cast(Tuple[int, int, int], image.shape)
        self._detected_faces: List["DetectedFace"] = ([] if detected_faces is None
                                                      else detected_faces)
 </s> add         self._image: np.ndarray | None = image
        self._image_shape = T.cast(tuple[int, int, int], image.shape)
        self._detected_faces: list[DetectedFace] = ([] if detected_faces is None
                                                    else detected_faces) </s> remove                  name: Optional[str] = None,
 </s> add                  name: str | None = None,
        self._thread: LongRunningTask | None = None  # Thread for loading data in background
      def __init__(self, session_id: int, data_points: int) -> None:
          logger.debug("Initializing: %s: (session_id: %s, data_points: %s)",
                       self.__class__.__name__, session_id, data_points)
          super().__init__()
        self._thread: LongRunningTask | None = None  # Thread for loading data in background
          self._default_view = "avg" if data_points > 1000 else "smoothed"
          self._session_id = None if session_id == "Total" else int(session_id)
  
          self._graph_frame = ttk.Frame(self)
          self._graph: Optional[SessionGraph] = None
keep keep keep keep replace keep keep keep keep keep
 Rebase code (#1326)

* Remove tensorflow_probability requirement

* setup.py - fix progress bars

* requirements.txt: Remove pre python 3.9 packages

* update apple requirements.txt

* update INSTALL.md

* Remove python<3.9 code

* setup.py - fix Windows Installer

* typing: python3.9 compliant

* Update pytest and readthedocs python versions

* typing fixes

* Python Version updates
  - Reduce max version to 3.10
  - Default to 3.10 in installers
  - Remove incompatible 3.11 tests

* Update dependencies

* Downgrade imageio dep for Windows

* typing: merge optional unions and fixes

* Updates
  - min python version 3.10
  - typing to python 3.10 spec
  - remove pre-tf2.10 code
  - Add conda tests

* train: re-enable optimizer saving

* Update dockerfiles

* Update setup.py
  - Apple Conda deps to setup.py
  - Better Cuda + dependency handling

* bugfix: Patch logging to prevent Autograph errors

* Update dockerfiles

* Setup.py - Setup.py - stdout to utf-8

* Add more OSes to github Actions

* suppress mac-os end to end test 
lib/gui/popup_session.py