code: def apply_no_ans_threshold(
      scores, na_probs, qid_to_has_ans, na_prob_thresh
  ):
      new_scores = {}
      for qid, s in scores.items():
          pred_na = na_probs[qid] > na_prob_thresh
          if pred_na:
              new_scores[qid] = float(not qid_to_has_ans[qid])
          else:
              new_scores[qid] = s
      return new_scores
  
imports: import argparse
  import collections
  import json
  import numpy
  import os
  import re
  import string
  import sys
label_desc: Use image node_id 9 for calling a global function with example usage: apply_no_ans_threshold(scores, na_probs, qid_to_has_ans, na_prob_thresh) and returns: new_scores