def METHOD_NAME(self, file_path, test=False):
    cnt = 0
    with h5py.File(file_path, "r") as h5_file:
        for client_id in tqdm(
            h5_file[self._EXAMPLE].keys(),
            desc="process %s data" % "test" if test else "train",
        ):
            samples = [
                s.decode("utf8")
                for s in h5_file[self._EXAMPLE][client_id][self._TOKENS][()]
            ]
            if len(samples) != 0:
                for sample in samples:
                    idx = len(self.X)
                    self.X[idx] = sample
                    cnt += 1
                    if client_id not in self.nature_partition_dict:
                        self.nature_partition_dict[client_id] = {
                            "train": list(),
                            "test": list(),
                        }
                    if test:
                        self.nature_partition_dict[client_id]["test"].append(idx)
                    else:
                        self.nature_partition_dict[client_id]["train"].append(idx)
    return cnt