def METHOD_NAME(self, epoch):
    logger.debug("ResamplingDataset.set_epoch: {}".format(epoch))
    super().METHOD_NAME(epoch)
    if epoch == self._cur_epoch:
        return
    self._cur_epoch = epoch
    # Generate a weighted sample of indices as a function of the
    # random seed and the current epoch.
    rng = np.random.RandomState(
        [
            42,  # magic number
            self.seed % (2 ** 32),  # global seed
            self._cur_epoch,  # epoch index
        ]
    )
    self._cur_indices = plasma_utils.PlasmaArray(
        rng.choice(
            len(self.dataset),
            self.actual_size,
            replace=self.replace,
            p=(None if self.weights is None else self.weights.array),
        )
    )