docs: public static void writeJsonToFile(String filename,
        List<SemanticParserExampleLoss> losses, List<Map<String, Object>> annotations) {
      Preconditions.checkArgument(annotations.size() == losses.size());
      List<String> lines = Lists.newArrayList();
      for (int i = 0; i < losses.size(); i++) {
        lines.add(losses.get(i).toJson(annotations.get(i)));
      }
      IoUtils.writeLines(filename, lines);
    }