          directory = get_folder(directory)
  
      dir_scanned = sorted(os.scandir(directory), key=lambda x: x.name)
      logger.debug("Scanned Folder contains %s files", len(dir_scanned))
      logger.trace("Scanned Folder Contents: %s", dir_scanned)
  
      for chkfile in dir_scanned:
          if any(chkfile.name.lower().endswith(ext) for ext in image_extensions):
              logger.trace("Adding '%s' to image list", chkfile.path)
              dir_contents.append(chkfile.path)
 
</s> remove             logger.trace("Adding '%s' to image list", chkfile.path)
 </s> add             logger.trace("Adding '%s' to image list", chkfile.path)  # type:ignore </s> remove     def _download_model(self):
 </s> add     def _download_model(self) -> None: </s> remove         self.logger.trace(retval)
 </s> add         self.logger.trace(retval)  # type: ignore </s> remove     def model_path(self):
        """ str: The model path(s) in the cache folder. """
        retval = [os.path.join(self._cache_dir, fname) for fname in self._model_filename]
        retval = retval[0] if len(retval) == 1 else retval
        self.logger.trace(retval)
 </s> add     def model_path(self) -> Union[str, List[str]]:
        """ str or list: The model path(s) in the cache folder. """
        paths = [os.path.join(self._cache_dir, fname) for fname in self._model_filename]
        retval: Union[str, List[str]] = paths[0] if len(paths) == 1 else paths
        self.logger.trace(retval)  # type: ignore </s> remove     def _model_exists(self):
 </s> add     def _model_exists(self) -> bool:
    logger.trace("Scanned Folder Contents: %s", dir_scanned)  # type:ignore
          directory = get_folder(directory)
  
      dir_scanned = sorted(os.scandir(directory), key=lambda x: x.name)
      logger.debug("Scanned Folder contains %s files", len(dir_scanned))
    logger.trace("Scanned Folder Contents: %s", dir_scanned)  # type:ignore
  
      for chkfile in dir_scanned:
          if any(chkfile.name.lower().endswith(ext) for ext in image_extensions):
              logger.trace("Adding '%s' to image list", chkfile.path)
              dir_contents.append(chkfile.path)
keep keep keep keep replace keep keep keep keep keep
 lib.Utils - add DPI detector 
lib/utils.py