code: def create_fb_format(outpath, dtype, inpath):
      print("building fbformat:" + dtype)
      with PathManager.open(
          os.path.join(outpath, dtype + ".txt"), "w"
      ) as fout:
          for f in os.listdir(inpath):
              if f.endswith(".question"):
                  fname = os.path.join(inpath, f)
                  _process(fname, fout)
  
imports: import parlai.core.build_data
  import os
  from parlai.core.build_data import DownloadableFile
  from parlai.utils.io import PathManager
label_desc: Use image node_id 2 for calling a global function with example usage: create_fb_format(outpath, dtype, inpath) without return types