code: def make_qid_to_has_ans(dataset):
      qid_to_has_ans = {}
      for article in dataset:
          for p in article["paragraphs"]:
              for qa in p["qas"]:
                  qid_to_has_ans[qa["id"]] = bool(qa["answers"])
      return qid_to_has_ans
  
imports: import argparse
  import collections
  import json
  import numpy
  import os
  import re
  import string
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: make_qid_to_has_ans(dataset) and returns: qid_to_has_ans