              stats["rate"] = (((stats["batch"] * 2) * stats["iterations"])
                               / stats["elapsed"] if stats["elapsed"] != 0 else 0)
          logger.debug("per_session_stats: %s", self._per_session_stats)
  
      def _collate_stats(self, session_id, timestamps):
          """ Collate the session summary statistics for the given session ID.
  
          Parameters
          ----------
          session_id: int
 
</s> remove         timestamps:
            The time stamp summary data for the given session id
 </s> add  </s> remove         logger.debug("Calculating Average")
 </s> add         logger.debug("Calculating Average. Data points: %s", len(data)) </s> remove     def get_loss(self, session_id):
 </s> add     def get_loss(self, session_id: Optional[int]) -> dict: </s> remove     def __init__(self, session_id, data_points):
 </s> add     def __init__(self, session_id: int, data_points: int) -> None: </s> remove     def get_loss_keys(self, session_id):
 </s> add     def get_loss_keys(self, session_id: Optional[int]) -> List[str]:
    def _collate_stats(self, session_id: int) -> dict:
              stats["rate"] = (((stats["batch"] * 2) * stats["iterations"])
                               / stats["elapsed"] if stats["elapsed"] != 0 else 0)
          logger.debug("per_session_stats: %s", self._per_session_stats)
  
    def _collate_stats(self, session_id: int) -> dict:
          """ Collate the session summary statistics for the given session ID.
  
          Parameters
          ----------
          session_id: int
keep keep keep keep replace keep keep keep keep keep
 Bugfixes:
  - Stats graph - Handle NaNs in data
  - logger - de-elevate matplotlib font messages 
lib/gui/analysis/stats.py