docstr: Given a `doc`, flatten it out so that each JSON blob
  contains exactly one question and one answer. Logic taken from
  the reference implementation available at
  https://github.com/allenai/qasper-led-baseline/blob/main/scripts/evaluator.py
docstr_tok: ["Given","a","`","doc","`",",","flatten","it","out","so","that","each","JSON","blob","contains","exactly","one","question","and","one","answer",".","Logic","taken","from","the","reference","implementation","available","at","https",":","\/\/github.com\/allenai\/qasper-led-baseline\/blob\/main\/scripts\/evaluator.py"]
code: def _process_doc(self, doc):
      """Given a `doc`, flatten it out so that each JSON blob
      contains exactly one question and one answer. Logic taken from
      the reference implementation available at
      https://github.com/allenai/qasper-led-baseline/blob/main/scripts/evaluator.py
      """
      obs_list = []
      for question, answer_list in zip(
          doc["qas"]["question"], doc["qas"]["answers"]
      ):
          for answer_blob in answer_list["answer"]:
              answer, answer_type = categorise_answer(answer_blob)
              obs_list.append(
                  {
                      "title": doc["title"],
                      "abstract": doc["abstract"],
                      "question": question,
                      "answer": answer,
                      "answer_type": answer_type,
                  }
              )
      return obs_list
  
imports: from collections import Counter
  import re
  import string
  from lm_eval.base import rf, Task
  from lm_eval.metrics import f1_score, mean
label_desc: Use image node_id 8 for calling the QASPER obj's underlying member method code with example usage: obj._process_doc(doc) and returns: obs_list