                      logger.error("Error reading the preview file for '%s'", img)
                      print(f"Error reading the preview file for {name}")
                      self._previewtrain[name] = None
  
      def _get_current_size(self, name):
          """ Return the size of the currently displayed training preview image.
  
          Parameters
          ----------
          name: str
 
</s> remove                     self._previewtrain[name] = None
 </s> add                     del self._previewtrain[name] </s> remove     def load_training_preview(self):
 </s> add     def load_training_preview(self) -> None: </s> remove     def resize_image(self, name, frame_dims):
 </s> add     def resize_image(self, name: str, frame_dims: Tuple[int, int]): </s> remove     def clear(self, trigger_type=None):
 </s> add     def clear(self, trigger_type: Optional[Literal["update", "mask_toggle"]] = None) -> None:
    def _get_current_size(self, name: str) -> Optional[Tuple[int, int]]:
                      logger.error("Error reading the preview file for '%s'", img)
                      print(f"Error reading the preview file for {name}")
                      self._previewtrain[name] = None
  
    def _get_current_size(self, name: str) -> Optional[Tuple[int, int]]:
          """ Return the size of the currently displayed training preview image.
  
          Parameters
          ----------
          name: str
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Preview for extract in batch mode 
lib/gui/utils.py