              self._log_files.get(session_id))
          parser = _EventParser(iterator, self._cache, live_data)
          parser.cache_events(session_id)
  
      def _check_cache(self, session_id=None):
          """ Check if the given session_id has been cached and if not, cache it.
  
          Parameters
          ----------
          session_id: int, optional
 
</s> remove     def get_loss(self, session_id=None):
 </s> add     def get_loss(self, session_id: Optional[int] = None) -> Dict[int, Dict[str, np.ndarray]]: </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             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 cache_data(self, session_id, data, labels, is_live=False):
 </s> add     def cache_data(self,
                   session_id: int,
                   data: Dict[int, EventData],
                   labels: List[str],
                   is_live: bool = False) -> None:
    def _check_cache(self, session_id: Optional[int] = None) -> None:
              self._log_files.get(session_id))
          parser = _EventParser(iterator, self._cache, live_data)
          parser.cache_events(session_id)
  
    def _check_cache(self, session_id: Optional[int] = None) -> None:
          """ Check if the given session_id has been cached and if not, cache it.
  
          Parameters
          ----------
          session_id: int, optional
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