          """
          return PluginLoader._import("train.model", name, disable_logging)
  
      @staticmethod
      def get_trainer(name: str, disable_logging: bool = False) -> "TrainerBase":
          """ Return requested training trainer plugin
  
          Parameters
          ----------
          name: str
 
</s> remove     def request_refresh(self) -> None:
        """ Handle a GUI trigger or a training thread trigger (after a mask toggle) request to set
        the refresh trigger to ``True`` to request a refresh on the next pass of the
        training loop. """
        with self._lock:
            self._triggers["refresh"] = True

    def request_mask_toggle(self) -> None:
        """ Handle a GUI trigger request to set the mask toggle to ``True`` to
        request a mask toggle on next pass of the training loop. """
        logger.verbose("Toggle mask display requested...")  # type:ignore
        with self._lock:
            self._triggers["toggle_mask"] = True

    def add_image(self, name: str, image: np.ndarray) -> None:
        """ Add a preview image to the preview buffer.

        Parameters
        ----------
        name: str
            The name of the preview image to add to the buffer
        image: :class:`numpy.ndarray`
            The preview image to add to the buffer in BGR format.
        """
        with self._lock:
            logger.debug("Adding image '%s' of shape %s to preview buffer", name, image.shape)
            self._preview_buffer[name] = image[..., 2::-1]  # Switch to RGB
            self._needs_update = True

    def display_preview(self) -> None:
        """ Display an image preview in a resizable window. """
        if self._needs_update:
            logger.debug("Updating preview")
            with self._lock:
                for name, image in self._preview_buffer.items():
                    if (name not in self._images or  # new preview or preview was closed
                            not plt.fignum_exists(self._images[name][0].number)):
                        self._create_resizable_window(name, image.shape)
                        if self._triggers["full_size"]:  # Can only be true if preview was closed
                            self._set_resize_callback()
                    plt.figure(name)
                    plt.imshow(image)
                self._needs_update = False
            plt.show(block=False)
            logger.debug("preview updated")  # type: ignore
        plt.pause(0.1)

    def _create_resizable_window(self, name: str, image_shape: tuple) -> None:
        """ Create a resizable Matplotlib window to hold the preview image.
 </s> add     def _launch_thread(self) -> Optional[FSThread]:
        """ Launch the preview viewer in it's own thread if preview has been selected </s> remove         Parameters
        ----------
        name: str
            The name to display in the window header and for window identification
        shape: tuple
            The (`rows`, `columns`, `channels`) of the image to be displayed
 </s> add         Returns
        -------
        :class:`lib.multithreading.FSThread` or ``None``
            The thread that holds the preview viewer if preview is selected otherwise ``None`` </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()
    def get_trainer(name: str, disable_logging: bool = False) -> Type["TrainerBase"]:
          """
          return PluginLoader._import("train.model", name, disable_logging)
  
      @staticmethod
    def get_trainer(name: str, disable_logging: bool = False) -> Type["TrainerBase"]:
          """ Return requested training trainer plugin
  
          Parameters
          ----------
          name: str
keep keep keep keep replace keep keep keep keep keep
 Training - Use custom preview pop-out 
plugins/plugin_loader.py