import torch


def gen_data(n_data, args):
    """
    Generate data tuples. Letter sequence and ground truth ordering.
    """
    # n_data = args.n_data
    n_labels = args.num_labels
    all_data = torch.stack([torch.randperm(n_labels) for _ in range(n_data)])
    # vals, all_labels = torch.topk(all_data, k=n_labels, dim=-1, largest=False) #all_data.clone()
    all_labels = all_data.clone()
    return all_data, all_labels