              placeholder = np.concatenate([np.expand_dims(self._previewcache["placeholder"],
                                                           0)] * remainder)
              samples = np.concatenate((samples, placeholder))
  
          display = np.vstack([np.hstack(samples[row * cols: (row + 1) * cols])
                               for row in range(rows)])
          logger.debug("display shape: %s", display.shape)
          return Image.fromarray(display)
  
      def _create_placeholder(self, thumbnail_size):
 
</s> remove             placeholder = np.concatenate([np.expand_dims(self._previewcache["placeholder"],
                                                         0)] * remainder)
 </s> add             placeholder = np.concatenate([np.expand_dims(
                cast(np.ndarray, self._previewcache["placeholder"]), 0)] * remainder) </s> remove     def _create_placeholder(self, thumbnail_size):
 </s> add     def _create_placeholder(self, thumbnail_size: int) -> None: </s> remove         samples = []
 </s> add         samples: List[np.ndarray] = [] </s> remove         icons = {}
 </s> add         icons: Dict[str, ImageTk.PhotoImage] = {} </s> remove     def load_training_preview(self):
 </s> add     def load_training_preview(self) -> None:
        display = np.vstack([np.hstack(cast(Sequence, samples[row * cols: (row + 1) * cols]))
              placeholder = np.concatenate([np.expand_dims(self._previewcache["placeholder"],
                                                           0)] * remainder)
              samples = np.concatenate((samples, placeholder))
  
        display = np.vstack([np.hstack(cast(Sequence, samples[row * cols: (row + 1) * cols]))
                               for row in range(rows)])
          logger.debug("display shape: %s", display.shape)
          return Image.fromarray(display)
  
      def _create_placeholder(self, thumbnail_size):
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Preview for extract in batch mode 
lib/gui/utils.py