  
      def _process_gui_triggers(self) -> None:
          """ 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):
 
</s> remove         parent_flags = dict(mask_toggle="request_mask_toggle", update="request_refresh")
        for trigger in ("mask_toggle", "update"):
            filename = self._gui_triggers[trigger]
 </s> add         for trigger, filename in self._gui_triggers.items(): </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 
 </s> add                 retval[trigger] = True </s> remove     if log_file is not None:
 </s> add     if log_file: </s> remove         """ Check whether a save request has been made. If ``True`` is returned then :attr:`_save`
        is set back to ``False``

        Returns
        -------
        bool
            ``True`` if a save has been requested otherwise ``False``. """
        with self._lock:
            retval = self._triggers["save"]
            if retval:
                logger.debug("Sending should save")
                self._triggers["save"] = False
 </s> add         """ bool: Check whether a save request has been made. If ``True`` is returned then save
        trigger is set back to ``False`` """
        if not self._active:
            return False
        retval = self._triggers["save"].is_set()
        if retval:
            logger.debug("Sending should save")
            self._triggers["save"].clear()
            return retval
  
      def _process_gui_triggers(self) -> None:
          """ Check whether a file drop has occurred from the GUI to manually update the preview. """
          if not self._args.redirect_gui:
            return retval
  
          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):
keep keep keep keep replace keep keep keep keep keep
 Training - Use custom preview pop-out 
scripts/train.py