code: def _create_parlai_format(dpath: str):
      """
      Copy data into the format read by ConversationTeacher.
      """
  
      datatypes = ["train", "valid", "test"]
      for datatype in datatypes:
          datatype_full = "LCCC-base_" + datatype
          load_path = os.path.join(dpath, f"{datatype_full}.json")
          save_path = os.path.join(dpath, f"{datatype}.json")
          with PathManager.open(
              load_path, "r", encoding="utf8"
          ) as f_read:
              data = json.load(f_read)
          with PathManager.open(
              save_path, "w", encoding="utf8"
          ) as f_write:
              for episode in data:
                  new_episode = []
                  pid = 0
                  for text in episode:
                      new_episode.append(
                          {
                              "id": "partner{}".format(pid + 1),
                              "text": text.replace(" ", ""),
                          }
                      )
                      pid = (pid + 1) % 2
                  print(
                      json.dumps(
                          {"dialog": [new_episode]}, ensure_ascii=False
                      ),
                      file=f_write,
                  )
          os.remove(load_path)
  
imports: from parlai.core.build_data import DownloadableFile
  from parlai.utils.io import PathManager
  import parlai.core.build_data
  import os
  import json
label_desc: Use image node_id 2 for calling a global function with example usage: _create_parlai_format(dpath) without return types