def METHOD_NAME(self, epoch):
    rng = np.random.RandomState(
        [
            int(
                hashlib.sha1(
                    str(self.__class__.__name__).encode("utf-8")
                ).hexdigest(),
                16,
            )
            % (2 ** 32),
            self.seed % (2 ** 32),  # global seed
            epoch,  # epoch index,
        ]
    )
    del self._random_global_indices
    self._random_global_indices = rng.choice(
        self.virtual_size, self.virtual_size, replace=False
    )
    if self.load_next_shard is None:
        self.load_next_shard = False
    else:
        # increase shard epoch for next loading
        self.shard_epoch += 1
        self.load_next_shard = True
        logger.info(
            "to load next epoch/shard in next load_dataset: "
            f"epoch={epoch}/shard_epoch={self.shard_epoch}"
        )