code: def process_results(self, doc, results):
      # TODO: Calculate a score for extractive spans once a request type for generating
      # extractive spans is available
      if not results:
          return {}
      elif len(results) == 1:
          [res] = results
      elif len(results) == 2:
          [ll_yes, ll_no] = results
  
      # TODO: Handle unanswerability first
      # unanswerable_gold = doc["answer_type"] == "unanswerable"
      # unanswerable_pred = exp(logprob_unanswerable)
      # res_dict["f1_unanswerable"] = (unanswerable_gold, unanswerable_pred)
  
      res_dict = {}
      # Handle yes/no questions
      if doc["answer_type"] == "bool":
          gold = 1 if doc["answer"] == "yes" else 0
          pred = ll_yes > ll_no
          res_dict["f1_yesno"] = (gold, pred)
  
      # Handle completions
      if doc["answer_type"] == "free form answer":
          res_dict["f1_abstractive"] = token_f1_score(
              res, doc["answer"]
          )
  
      # TODO: Handle extraction
      # if doc["answer_type"] == "extractive_spans":
      #     res_dict["f1_extractive"] = 0
      return res_dict
  
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 9 for calling the QASPER obj's underlying member method code with example usage: obj.process_results(doc, results) and returns: res_dict, dict