code: def merge_train(train_q_dir):
      merged_dic = {}
  
      for file_name in tqdm.tqdm(os.listdir(train_q_dir)):
          full_path = os.path.join(train_q_dir, file_name)
          partial_questions = json.load(open(full_path))
          merged_dic.update(partial_questions)
  
      save_dir = os.path.abspath(os.path.join(train_q_dir, os.pardir))
  
      with open(
          os.path.join(save_dir, "train_all_questions.json"), "w"
      ) as fp:
          json.dump(merged_dic, fp)
  
file_path: mmf/tools/scripts/gqa/convert_gqa_to_vqa.py
imports: import argparse
  import json
  import os
  import re
  from collections import Counter
  import h5py
  import numpy
  import tqdm
  from mmf.utils.process_answers import preprocess_answer
  from mmf.utils.text_processing import text_tokenize
label_desc: Use image node_id 1 for calling a global function with example usage: merge_train(train_q_dir) without return types