def METHOD_NAME(self, n_samples):
    delimiter = None
    if self.example_file.endswith(".tsv"):
        delimiter = "\t"
    if self.example_file.endswith(".csv"):
        delimiter = ","
    with open(self.example_file, "r") as f:
        reader = csv.reader(f, delimiter=delimiter)
        R = []
        for r in reader:
            R += [r]
    idxs = [i for i in range(len(R))]
    idxs = random.choices(idxs, k=n_samples)
    D = []
    for idx in idxs:
        r = R[idx]
        D += [{"key": r[0], "input": r[1], "text": r[2]}]
    return D