code: def after_epoch(self, epoch_id: int, epoch_data: EpochData) -> None:
          
          self._check_train_time()
          if self._epochs is not None and epoch_id >= self._epochs:
              logging.info('EpochStopperHook triggered')
              raise TrainingTerminated('Training terminated after epoch {}'.format(epoch_id))
docs: Stop the training if the ``epoch_id`` reaches ``self._epochs``; additionally, call :py:meth:`_check_train_time`.
  
          :param epoch_id: epoch id
          :param epoch_data: ignored
          :raise TrainingTerminated: if the ``epoch_id`` reaches ``self._epochs``