def METHOD_NAME():
    if torch.distributed.get_rank() != 0:
        return
    args = get_retro_args()
    # Get block, merged paths.
    load_fraction = args.retro_index_train_load_fraction
    block_paths = get_training_data_block_paths()
    bin_path = get_training_data_merged_path()
    # Skip, if already built.
    if os.path.exists(bin_path):
        return
    # Merge blocks.
    with open(bin_path, "wb") as fo:
        byte_offset = 0
        for block_idx, block_path in \
            enumerate(tqdm(block_paths, "merge train embeddings")):
            with h5py.File(block_path) as fi:
                nload = get_block_nload(block_path, load_fraction)
                block = np.array(fi["data"][:nload], copy = False)
                fo.write(block.tobytes())
                byte_offset += block.size * block.itemsize
                fo.seek(byte_offset)