def next_epoch_idx(self):
        """Return the epoch index after *next_epoch_itr* is called."""
        if self._current_epoch_iterator is not None and self.end_of_epoch():
            return self.epoch + 1
        else:
            return self.epoch
Return the epoch index after *next_epoch_itr* is called.
understand_icl/fairseq/fairseq/data/iterators.py