  import os
  import logging
  import re
  import signal
  from subprocess import PIPE, Popen
  import sys
  from threading import Thread
  from time import time
  
  import psutil
 
</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     def capture_loss(self, string):
        """ Capture loss values from stdout """
        logger.trace("Capturing loss")
 </s> add     def _capture_loss(self, string: str) -> bool:
        """ Capture loss values from stdout

        Parameters
        ----------
        string: str
            An output line read from stdout

        Returns
        -------
        bool
            ``True`` if a loss line was captured from stdout, otherwise ``False``
        """
        logger.trace("Capturing loss")  # type:ignore[attr-defined] </s> remove         self.wrapper.tk_vars.refresh_graph.set(True)
 </s> add         tk_vars.refresh_graph.set(True)
  import os
  import logging
  import re
  import signal

  import sys
  from threading import Thread
  from time import time
  
  import psutil
keep keep keep keep replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py