def METHOD_NAME(self, sample_shape=torch.Size()):
    """
    :returns: a random subsample of `range(size)`
    :rtype: torch.LongTensor
    """
    if sample_shape:
        raise NotImplementedError
    subsample_size = self.subsample_size
    if subsample_size is None or subsample_size >= self.size:
        result = torch.arange(self.size, device=self.device)
    else:
        result = torch.randperm(self.size, device=self.device)[
            :subsample_size
        ].clone()
    return result.cuda() if self.use_cuda else result