code: def consolidate_convo_split(dpath: str, split: str):
      all_convos = {}
      src_dir = os.path.join(dpath, "Conversations", split)
      for f_name in tqdm(os.listdir(src_dir)):
          with open(os.path.join(src_dir, f_name)) as f:
              convo = json.load(f)
          cid = f_name.split(".")[0]
          all_convos[cid] = convo
      dest_path = os.path.join(dpath, "conversations", f"{split}.json")
      with open(dest_path, "w") as dest:
          json.dump(all_convos, dest, indent=2)
      shutil.rmtree(src_dir)
  
file_path: ParlAI/parlai/tasks/cmu_dog/build.py
imports: import json
  import os
  import random
  import shutil
  from tqdm import tqdm
  import parlai.core.build_data
  from parlai.core.build_data import DownloadableFile
  from parlai.utils.io import PathManager
  from parlai.utils.logging import logger
label_desc: Use image node_id 5 for calling a global function with example usage: consolidate_convo_split(dpath, split) without return types