              del timestamps[-1]
  
          return timestamps, loss
  
      def _add_latest_live(self, session_id, loss, timestamps):
          """ Append the latest received live training data to the cached data.
  
          Parameters
          ----------
          session_id: int
 
</s> remove         return timestamps, loss
 </s> add         return l_timestamps, l_loss </s> remove                          timestamps[-1], loss[-1])
            del loss[-1]
            del timestamps[-1]
 </s> add                          l_timestamps[-1], loss[-1])
            del l_loss[-1]
            del l_timestamps[-1] </s> remove             del old

    def get_data(self, session_id, metric):
 </s> add     def get_data(self, session_id: int, metric: Literal["loss", "timestamps"]
                 ) -> Optional[Dict[int, Dict[str, Union[np.ndarray, List[str]]]]]: </s> remove     def is_cached(self, session_id):
        """ bool: ``True`` if the data already exists in the cache otherwise ``False``. """
 </s> add     def is_cached(self, session_id: int) -> bool:
        """ Check if the given session_id's data is already cached

        Parameters
        ----------
        session_id: int
            The session ID to check

        Returns
        -------
        bool
            ``True`` if the data already exists in the cache otherwise ``False``.
        """ </s> remove         data: dict
 </s> add         data[int, :class:`EventData`]
    def _add_latest_live(self, session_id: int, loss: np.ndarray, timestamps: np.ndarray) -> None:
              del timestamps[-1]
  
          return timestamps, loss
  
    def _add_latest_live(self, session_id: int, loss: np.ndarray, timestamps: np.ndarray) -> None:
          """ Append the latest received live training data to the cached data.
  
          Parameters
          ----------
          session_id: int
keep keep keep keep replace keep keep keep keep keep
 Bugfixes
  - plugin.train.unbalanced - decoder b
  - gui.stats - crash when log folder deleted
  - setup.py - install gcc=12.1.0 on linux (scipy dep)
  - setup.py - don't test ROCm unless valid
  - typofix - cli_args extract singleprocess help
typing
  - lib.gui.analysis.event_reader
  - lib.gpu_stats.directml - make platform specific
unit tests
  - lib.gui.analysis.event_reader 
lib/gui/analysis/event_reader.py