                      plt.figure(name)
                      plt.imshow(image)
                  self._needs_update = False
              logger.debug("preview updated")  # type: ignore
          plt.show(block=False)
          plt.pause(0.1)
  
      def _create_resizable_window(self, name: str, image_shape: tuple) -> None:
          """ Create a resizable Matplotlib window to hold the preview image.
  
 
</s> remove     def _reassign_keys(cls):
        """ Remove `F`, 'S' and 'R' from their default bindings. """
 </s> add     def _configure_matplotlib(cls):
        """ Remove `F`, 'S' and 'R' from their default bindings and stop Matplotlib from stealing
        focus """ </s> remove         self._reassign_keys()
 </s> add         self._configure_matplotlib() </s> remove         legacy_defaults = dict(centering="legacy",
                               mask_loss_function="mse",
                               l2_reg_term=100,
                               optimizer="adam",
                               mixed_precision=False)
 </s> add         legacy_defaults: Dict[str, Union[str, int, bool]] = dict(centering="legacy",
                                                                 mask_loss_function="mse",
                                                                 l2_reg_term=100,
                                                                 optimizer="adam",
                                                                 mixed_precision=False)
                      plt.figure(name)
                      plt.imshow(image)
                  self._needs_update = False
              logger.debug("preview updated")  # type: ignore

          plt.pause(0.1)
  
      def _create_resizable_window(self, name: str, image_shape: tuple) -> None:
          """ Create a resizable Matplotlib window to hold the preview image.
  
keep keep keep keep replace keep keep keep keep keep
 bugfix: Stop preview window from stealing focus 
scripts/train.py