code: def _process(fname, fout):
      with PathManager.open(fname) as f:
          lines = [line.strip("\n") for line in f]
      # main article
      s = "1 " + lines[2]
      # add question
      s = s + " " + lines[4]
      # add answer
      s = s + "\t" + lines[6]
      # add candidates (and strip them of the real names)
      for i in range(8, len(lines)):
          lines[i] = lines[i].split(":")[0]
      s = s + "\t\t" + "|".join(lines[8:])
      fout.write(s + "\n\n")
  
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 1 for calling a global function with example usage: _process(fname, fout) without return types