          """ Check whether a file drop has occurred from the GUI to manually update the preview. """
          if not self._args.redirect_gui:
              return
  
          parent_flags = dict(mask_toggle="request_mask_toggle", update="request_refresh")
          for trigger in ("mask_toggle", "update"):
              filename = self._gui_triggers[trigger]
              if os.path.isfile(filename):
                  logger.debug("GUI Trigger received for: '%s'", trigger)
  
                  logger.debug("Removing gui trigger file: %s", filename)
                  os.remove(filename)
 
</s> remove             return
 </s> add             return retval </s> remove 
 </s> add                 retval[trigger] = True </s> remove     def _process_gui_triggers(self) -> None:
        """ Check whether a file drop has occurred from the GUI to manually update the preview. """
 </s> add     def _process_gui_triggers(self) -> Dict[Literal["mask", "refresh"], bool]:
        """ Check whether a file drop has occurred from the GUI to manually update the preview.

        Returns
        -------
        dict
            The trigger name as key and boolean as value
        """
        retval: Dict[Literal["mask", "refresh"], bool] = {key: False for key in self._gui_triggers} </s> remove                 if trigger == "update":
                    print("\n")  # Let log print on different line from loss output
 </s> add                 if trigger == "refresh":
                    print("")  # Let log print on different line from loss output </s> remove     if log_file is not None:
 </s> add     if log_file:
        for trigger, filename in self._gui_triggers.items():
          """ Check whether a file drop has occurred from the GUI to manually update the preview. """
          if not self._args.redirect_gui:
              return
  
        for trigger, filename in self._gui_triggers.items():
        for trigger, filename in self._gui_triggers.items():
        for trigger, filename in self._gui_triggers.items():
              if os.path.isfile(filename):
                  logger.debug("GUI Trigger received for: '%s'", trigger)
  
                  logger.debug("Removing gui trigger file: %s", filename)
                  os.remove(filename)
keep keep keep keep replace replace replace keep keep keep keep keep
 Training - Use custom preview pop-out 
scripts/train.py