code: def apply_no_ans_threshold(
      scores, na_probs, qid_to_has_ans, na_prob_thresh
  ):
      new_scores = {}
      for qid, s in scores.items():
          # Treat those whose logits exceeds the threshold as unanswerable
          pred_na = na_probs[qid] > na_prob_thresh
          if pred_na:
              # The raw scores are converted to 1 if the answerability
              # are predicted else 0
              new_scores[qid] = float(not qid_to_has_ans[qid])
          else:
              new_scores[qid] = s
      return new_scores
  
file_path: gluon-nlp/scripts/question_answering/eval_utils.py
imports: import collections
  import json
  import copy
  import re
  import string
label_desc: Use image node_id 7 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