def METHOD_NAME(self, epoch: int) -> None:
    """Sets the epoch for this sampler. 
    When :attr:`shuffle=True`, this ensures all replicas use a different random 
    ordering for each epoch. Otherwise, the next iteration of this sampler 
    will yield the same ordering.
    Args:
        epoch (int): Epoch number.
    """
    self.epoch = epoch