          logger.debug("Got size: (name: '%s', width: '%s', height: '%s')",
                       name, img.width(), img.height())
          return img.width(), img.height()
  
      def resize_image(self, name, frame_dims):
          """ Resize the training preview image based on the passed in frame size.
  
          If the canvas that holds the preview image changes, update the image size
          to fit the new canvas and refresh :attr:`previewtrain`.
  
 
</s> remove         img = self._previewtrain[name][1]
 </s> add         img = cast(Image.Image, self._previewtrain[name][1]) </s> remove         if not self._previewtrain.get(name, None):
 </s> add         if not self._previewtrain.get(name): </s> remove     def _load_images_to_cache(self, image_files, frame_dims, thumbnail_size):
 </s> add     def _load_images_to_cache(self,
                              image_files: List[str],
                              frame_dims: Tuple[int, int],
                              thumbnail_size: int) -> bool: </s> remove     def previewtrain(self):
 </s> add     def previewtrain(self) -> Dict[str, List[Union[Image.Image, ImageTk.PhotoImage, None, float]]]: </s> remove     def load_training_preview(self):
 </s> add     def load_training_preview(self) -> None:
    def resize_image(self, name: str, frame_dims: Tuple[int, int]):
          logger.debug("Got size: (name: '%s', width: '%s', height: '%s')",
                       name, img.width(), img.height())
          return img.width(), img.height()
  
    def resize_image(self, name: str, frame_dims: Tuple[int, int]):
          """ Resize the training preview image based on the passed in frame size.
  
          If the canvas that holds the preview image changes, update the image size
          to fit the new canvas and refresh :attr:`previewtrain`.
  
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Preview for extract in batch mode 
lib/gui/utils.py