code: def histogram_na_prob(na_probs, qid_list, image_dir, name):
      if not qid_list:
          return
      x = [na_probs[k] for k in qid_list]
      weights = np.ones_like(x) / float(len(x))
      plt.hist(x, weights=weights, bins=20, range=(0.0, 1.0))
      plt.xlabel("Model probability of no-answer")
      plt.ylabel("Proportion of dataset")
      plt.title("Histogram of no-answer probability: %s" % name)
      plt.savefig(os.path.join(image_dir, "na_prob_hist_%s.png" % name))
      plt.clf()
  
imports: import argparse
  import collections
  import json
  import numpy
  import os
  import re
  import string
  import sys
label_desc: Use image node_id 15 for calling a global function with example usage: histogram_na_prob(na_probs, qid_list, image_dir, name) without return types