<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def after_epoch(self, epoch_data: EpochData, **_) -> None: """ 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 """

        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)