      @property
      def time_stats(self):
          """ Return session time stats """
          ts_data = self.session.tb_logs.get_timestamps()
          time_stats = {sess_id: {"start_time": min(timestamps),
                                  "end_time": max(timestamps),
                                  "datapoints": len(timestamps)}
                        for sess_id, timestamps in ts_data.items()}
          return time_stats
  
      @property
      def sessions_stats(self):
 
</s> remove         ctl.pack()
        Tooltip(ctl,
                text="Set the smoothing amount. 0 is no smoothing, 0.99 is maximum smoothing.",
                wraplength=200)
 </s> add         ctl.pack(padx=5, pady=5, fill=tk.X, expand=True)
        for item in (tbox, ctl):
            Tooltip(item,
                    text=hlp,
                    wraplength=200) </s> remove             return
 </s> add             return None </s> remove         if self.complete.is_set():
            logger.debug("Getting result from thread")
            retval = self._queue.get()
 </s> add         if not self.complete.is_set():
            logger.warning("Aborting attempt to retrieve result from a LongRunningTask that is "
                           "still running")
            return None
        if self.err:
            logger.debug("Error caught in thread")
            self._config.set_cursor_default(widget=self.widget)
            raise self.err[1].with_traceback(self.err[2])

        logger.debug("Getting result from thread")
        retval = self._queue.get()
        time_stats = {sess_id: {"start_time": min(timestamps) if timestamps else 0,
                                "end_time": max(timestamps) if timestamps else 0,
                                "datapoints": len(timestamps) if timestamps else 0}
      @property
      def time_stats(self):
          """ Return session time stats """
          ts_data = self.session.tb_logs.get_timestamps()
        time_stats = {sess_id: {"start_time": min(timestamps) if timestamps else 0,
                                "end_time": max(timestamps) if timestamps else 0,
                                "datapoints": len(timestamps) if timestamps else 0}
        time_stats = {sess_id: {"start_time": min(timestamps) if timestamps else 0,
                                "end_time": max(timestamps) if timestamps else 0,
                                "datapoints": len(timestamps) if timestamps else 0}
        time_stats = {sess_id: {"start_time": min(timestamps) if timestamps else 0,
                                "end_time": max(timestamps) if timestamps else 0,
                                "datapoints": len(timestamps) if timestamps else 0}
                        for sess_id, timestamps in ts_data.items()}
          return time_stats
  
      @property
      def sessions_stats(self):
keep keep keep keep replace replace replace keep keep keep keep keep
 GUI responsiveness and feature updates

- Add error handling to LongRunningTask
- Analysis: Fix timestats bug for missing session data
- Training: Update training graph inside LongRunningTask
- Training: Smoothing Amount Slider geometry fix
- Training: Auto update Analysis tab on training start and save interval
- Scripts: Keep control of the UI when terminating by terminating using LongRunningTask 
lib/gui/stats.py