def METHOD_NAME(self, epoch):
    if self._current_epoch_start_index is None:
        # initializing epoch idnices of a virtual dataset
        self._setup(epoch)
        self._next_virtual_epoch(epoch)
    else:
        # working on already intialized epoch indices
        if epoch == self._cur_epoch:
            # re-enter so return
            return
        self._next_virtual_epoch(epoch)