class_docstr: Restore the weights of the best model at the end of the training depending on a monitored quantity.
  
  Args:
      monitor (str): Quantity to monitor. (Default value = 'val_loss')
      mode (str): One of {'min', 'max'}.
          Whether the monitored has to be maximized or minimized. For instance, for `val_accuracy`,
          this should be `max`, and for `val_loss`, this should be `min`, etc.
          (Default value = 'min')
      verbose (bool): Whether to display a message when the model has improved or when restoring
          the best model.
          (Default value = False)
code: def on_epoch_end(self, epoch_number: int, logs: Dict):
      if self.monitor_op(logs[self.monitor], self.current_best):
          old_best = self.current_best
          self.current_best = logs[self.monitor]
  
          if self.verbose:
              print(
                  f"Epoch {epoch_number:d}: {self.monitor} improved from {old_best:0.5f} to {self.current_best:0.5f}"
              )
          self.best_weights = self.model.get_weight_copies()
  
imports: import warnings
  from typing import Dict
  from poutyne.framework.callbacks.callbacks import Callback
label_desc: Use image node_id 2 for calling the BestModelRestore obj's underlying member method code with example usage: obj.on_epoch_end(epoch_number, logs) without return types