def METHOD_NAME(self, epoch):
    """
    Sets the epoch number. When :attr:`shuffle=True`, this number is used
    as seeds of random numbers. By default, users may not set this, all
    replicas (workers) use a different random ordering for each epoch.
    If set same number at each epoch, this sampler will yield the same
    ordering at all epoches.
    Arguments:
        epoch (int): Epoch number.
    Examples:
        .. code-block:: python
            import numpy as np
            from paddle.io import Dataset, DistributedBatchSampler
            # init with dataset
            class RandomDataset(Dataset):
                def __init__(self, num_samples):
                    self.num_samples = num_samples
                def __getitem__(self, idx):
                    image = np.random.random([784]).astype('float32')
                    label = np.random.randint(0, 9, (1, )).astype('int64')
                    return image, label
                def __len__(self):
                    return self.num_samples
            dataset = RandomDataset(100)
            sampler = DistributedBatchSampler(dataset, batch_size=64)
            for epoch in range(10):
                sampler.set_epoch(epoch)
    """
    self.epoch = epoch