  
      This class should be initialized on GUI startup through :func:`initialize_images`. Any further
      access to this class should be through :func:`get_images`.
      """
      def __init__(self):
          logger.debug("Initializing %s", self.__class__.__name__)
          self._pathpreview = os.path.join(PATHCACHE, "preview")
          self._pathoutput = None
          self._previewoutput = None
          self._previewtrain = {}
 
</s> remove def initialize_images():
 </s> add def initialize_images() -> None: </s> remove def initialize_config(root, cli_opts, statusbar):
 </s> add def initialize_config(root: tk.Tk,
                      cli_opts: "CliOptions",
                      statusbar: "StatusBar") -> Optional["Config"]: </s> remove         self._pathoutput = None
        self._previewoutput = None
        self._previewtrain = {}
        self._previewcache = dict(modified=None,  # cache for extract and convert
                                  images=None,
                                  filenames=[],
                                  placeholder=None)
 </s> add         self._pathoutput: Optional[str] = None
        self._batch_mode = False
        self._previewoutput: Optional[Tuple[Image.Image, ImageTk.PhotoImage]] = None
        self._previewtrain: Dict[str, List[Union[Image.Image,
                                                 ImageTk.PhotoImage,
                                                 None,
                                                 float]]] = {}
        self._previewcache: Dict[str, Union[None, float, np.ndarray, List[str]]] = dict(
            modified=None,  # cache for extract and convert
            images=None,
            filenames=[],
            placeholder=None) </s> remove     def _clear_image_cache(self):
 </s> add     def _clear_image_cache(self) -> None:
    def __init__(self) -> None:
  
      This class should be initialized on GUI startup through :func:`initialize_images`. Any further
      access to this class should be through :func:`get_images`.
      """
    def __init__(self) -> None:
          logger.debug("Initializing %s", self.__class__.__name__)
          self._pathpreview = os.path.join(PATHCACHE, "preview")
          self._pathoutput = None
          self._previewoutput = None
          self._previewtrain = {}
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Preview for extract in batch mode 
lib/gui/utils.py