code: def parse_gsm8k(fn, savefile):
      with open(fn) as f:
          lines = f.readlines()
  
      structs = []
      for line in lines:
          data = json.loads(line.strip())
          blob = {}
          blob["premise"] = data["question"]
          blob["hypothesis"] = (
              "IGNORE THIS. Ground truth here for reference. "
              + data["ground_truth"]
          )
          blob["gpt-3"] = data["175b_verification"]["solution"]
          blob["answer"] = (
              "yes" if data["175b_verification"]["is_correct"] else "no"
          )
          blob["key"] = f"gsm8k_{len(structs)}"
          structs.append(blob)
  
      write_to_file(structs, savefile)
  
file_path: ParlAI/projects/roscoe/roscoe_data/restore_annotated.py
imports: import json
  import csv
  import os
  import re
  import xmltodict
  from parlai.core.params import ParlaiParser
label_desc: Use image node_id 6 for calling a global function with example usage: parse_gsm8k(fn, savefile) without return types