          -------
          Tuple
              The (`width`, `height`) of the current monitor's display
          """
          # TODO skip when loading in GUI?
          logger.debug("Obtaining screen geometry")
          assert isinstance(self._root, tk.Tk)
          self._root.update_idletasks()
          self._root.attributes("-fullscreen", True)
          self._root.state("iconic")
          retval = self._root.winfo_width(), self._root.winfo_height()
 
</s> remove         """ Obtain the geometry of the current screen.
 </s> add         """ Obtain the geometry of the current screen (standalone) or the dimensions of the widget
        holding the preview window (GUI). </s> remove     def _pad_and_border(self, image: Image.Image, size: int) -> np.ndarray:
        """ Pad rectangle images to a square and draw borders

        Parameters
        ----------
        image: :class:`PIL.Image`
            The image to process
        size: int
            The size of the image as it should be displayed

        Returns
        -------
        :class:`PIL.Image`:
            The processed image
        """
        if image.size[0] != image.size[1]:
            # Pad to square
            new_img = Image.new("RGB", (size, size))
            new_img.paste(image, ((size - image.size[0]) // 2, (size - image.size[1]) // 2))
            image = new_img
        draw = ImageDraw.Draw(image)
        draw.rectangle(((0, 0), (size, size)), outline="#E5E5E5", width=1)
        retval = np.array(image)
        logger.trace("image shape: %s", retval.shape)  # type: ignore
        return retval

    def _process_samples(self,
                         samples: List[np.ndarray],
                         filenames: List[str],
                         num_images: int) -> bool:
        """ Process the latest sample images into a displayable image.
 </s> add     def _create_placeholder(self, thumbnail_size: int) -> None:
        """ Create a placeholder image for when there are fewer thumbnails available
        than columns to display them. </s> remove             The size of the thumbnail that the placeholder should replicate
 </s> add             The size of each thumbnail that should be created
        frame_dims: tuple
            The (width (`int`), height (`int`)) of the display panel that will display the preview

        Returns
        -------
        bool
            ``True`` if a preview was succesfully loaded otherwise ``False``
        if not self._is_standalone:
            root = self._root.winfo_toplevel()  # Get dims of whole GUI
            retval = root.winfo_width(), root.winfo_height()
            logger.debug("Obtained frame geometry: %s", retval)
            return retval

          -------
          Tuple
              The (`width`, `height`) of the current monitor's display
          """
        if not self._is_standalone:
            root = self._root.winfo_toplevel()  # Get dims of whole GUI
            retval = root.winfo_width(), root.winfo_height()
            logger.debug("Obtained frame geometry: %s", retval)
            return retval

        if not self._is_standalone:
            root = self._root.winfo_toplevel()  # Get dims of whole GUI
            retval = root.winfo_width(), root.winfo_height()
            logger.debug("Obtained frame geometry: %s", retval)
            return retval

          assert isinstance(self._root, tk.Tk)
          self._root.update_idletasks()
          self._root.attributes("-fullscreen", True)
          self._root.state("iconic")
          retval = self._root.winfo_width(), self._root.winfo_height()
keep keep keep keep replace replace keep keep keep keep keep
 GUI - Preview updates
  - Training preview. Embed preview pop-out window
  - Bugfix - convert/extract previews 
lib/training/preview_tk.py