          self.train_stats["iterations"] = iterations
  
          elapsed = self.calc_elapsed()
          message = (f"Elapsed: {elapsed} | "
                     f"Session Iterations: {self.train_stats['iterations']}  {message}")
          self.statusbar.progress_update(message, 0, False)
          logger.trace("Succesfully captured loss: %s", message)
          return True
  
      def calc_elapsed(self):
          """ Calculate and format time since training started """
          now = time()
 
</s> remove         elapsed = self.calc_elapsed()
 </s> add         elapsed = self._calculate_elapsed() </s> remove     def calc_elapsed(self):
        """ Calculate and format time since training started """
 </s> add     def _calculate_elapsed(self) -> str:
        """ Calculate and format time since training started

        Returns
        -------
        str
            The amount of time elapsed since training started in HH:mm:ss format
        """ </s> remove         self.train_stats["iterations"] = iterations
 </s> add         self._train_stats["iterations"] = iterations </s> remove         elapsed_time = now - self.train_stats["timestamp"]
 </s> add         timestamp = self._train_stats["timestamp"]
        assert isinstance(timestamp, float)
        elapsed_time = now - timestamp </s> remove             hrs = int(elapsed_time // 3600)
            if hrs < 10:
                hrs = f"{hrs:02d}"
 </s> add             i_hrs = int(elapsed_time // 3600)
            hrs = f"{i_hrs:02d}" if i_hrs < 10 else str(i_hrs)
                   f"Session Iterations: {self._train_stats['iterations']}  {message}")
        self._statusbar.progress_update(message, 0, False)
        logger.trace("Succesfully captured loss: %s", message)  # type:ignore[attr-defined]
          self.train_stats["iterations"] = iterations
  
          elapsed = self.calc_elapsed()
          message = (f"Elapsed: {elapsed} | "
                   f"Session Iterations: {self._train_stats['iterations']}  {message}")
        self._statusbar.progress_update(message, 0, False)
        logger.trace("Succesfully captured loss: %s", message)  # type:ignore[attr-defined]
                   f"Session Iterations: {self._train_stats['iterations']}  {message}")
        self._statusbar.progress_update(message, 0, False)
        logger.trace("Succesfully captured loss: %s", message)  # type:ignore[attr-defined]
                   f"Session Iterations: {self._train_stats['iterations']}  {message}")
        self._statusbar.progress_update(message, 0, False)
        logger.trace("Succesfully captured loss: %s", message)  # type:ignore[attr-defined]
          return True
  
      def calc_elapsed(self):
          """ Calculate and format time since training started """
          now = time()
keep keep keep keep replace replace replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py