def METHOD_NAME(self, epoch):
    index = self._get_epoch_start_index(epoch)
    if index == 0 or self._random_global_indices is None:
        # need to start from the beginning,
        # so call super().set_epoch(epoch) to establish the global virtual indices
        logger.info(
            "establishing a new set of global virtual indices for "
            f"epoch={epoch}/shard_epoch={self.shard_epoch}"
        )
        super().set_epoch(epoch)
        self._next_global_indices(epoch)
    else:
        self._cur_epoch = epoch
    # reset cache sizes and ordered_indices for the epoch after moving to a new epoch
    self._clean_if_not_none(
        [
            self._epoch_sizes,
        ]
    )
    self._epoch_sizes = None
    self._current_epoch_start_index = index