def METHOD_NAME(self, file_path):
    global global_X
    global_X = self.X
    pool = Pool(15)
    num_groups = math.ceil(len(self.X) / self.CHUNK_SIZE)
    logging.info("total number of groups: %d" % num_groups)
    for i in range(num_groups):
        logging.info("start loading group %d" % i)
        pool.apply_async(self.generate_partial_h5_file, (i,))
    pool.close()
    pool.join()
    f = h5py.File(file_path, "w")
    f["attributes"] = json.dumps(self.attributes)
    logging.info("start merging")
    for i in tqdm(range(num_groups)):
        tmp_f = h5py.File("./tmp_h5_data_group_%d.h5" % i, "r")
        f.create_group("X_%d" % i)
        tmp_f.copy("X", f["X_%d" % i])
        tmp_f.close()
        os.remove("./tmp_h5_data_group_%d.h5" % i)
    logging.info("done for generating data file")
    f.close()