      def terminate_in_thread(self, command, process):
          """ Terminate the subprocess """
          logger.debug("Terminating wrapper")
          if command == "train":
              timeout = self.config.user_config_dict.get("timeout", 120)
              logger.debug("Sending Exit Signal")
              print("Sending Exit Signal", flush=True)
              now = time()
              if os.name == "nt":
                  logger.debug("Sending carriage return to process")
 
</s> remove     def terminate_in_thread(self, command, process):
        """ Terminate the subprocess """
 </s> add         Parameters
        ----------
        command: str
            The command that is running

        process: :class:`subprocess.Popen`
            The running process

        Returns
        -------
        bool
            ``True`` when this function exits
        """ </s> remove                 keypress = self.generate_windows_keypress("\n")
 </s> add                 keypress = self._generate_windows_keypress("\n") </s> remove             _ = self.thread.get_result()  # Terminate the LongRunningTask object
            self.thread = None
 </s> add             _ = self._thread.get_result()  # Terminate the LongRunningTask object
            self._thread = None

    def _terminate_in_thread(self, command: str, process: Popen) -> bool:
        """ Terminate the subprocess </s> remove             self.terminate_all_children()
 </s> add             self._terminate_all_children() </s> remove     def terminate(self):
        """ Terminate the running process in a LongRunningTask so we can still
            output to console """
        if self.thread is None:
 </s> add     def terminate(self) -> None:
        """ Terminate the running process in a LongRunningTask so console can still be updated
        console """
        if self._thread is None:
            timeout = self._config.user_config_dict.get("timeout", 120)
      def terminate_in_thread(self, command, process):
          """ Terminate the subprocess """
          logger.debug("Terminating wrapper")
          if command == "train":
            timeout = self._config.user_config_dict.get("timeout", 120)
              logger.debug("Sending Exit Signal")
              print("Sending Exit Signal", flush=True)
              now = time()
              if os.name == "nt":
                  logger.debug("Sending carriage return to process")
keep keep keep keep replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py