code: def after_epoch(self, epoch_data: EpochData, **_) -> None:
          
          new_value = self._get_value(epoch_data)
  
          if self._is_value_better(new_value):
              self._best_value = new_value
              SaveEvery.save_model(model=self._model, name_suffix=self._OUTPUT_NAME, on_failure=self._on_save_failure)
docs: Save the model if the new value of the monitored variable is better than the best value so far.
  
          :param epoch_data: epoch data to be processed