code: def plot_prediction_hist(label_list, pred_list, type_list, outfile):
      """
      plot histogram of predictions for a specific class.
      :param label_list: list of 1s and 0s specifying whether prediction is a true positive match (1) or a false positive (0).
      False negatives (missed ground truth objects) are artificially added predictions with score 0 and label 1.
      :param pred_list: list of prediction-scores.
      :param type_list: list of prediction-types for stastic-info in title.
      """
      preds = np.array(pred_list)
      labels = np.array(label_list)
      title = outfile.split("/")[-1] + " count:{}".format(
          len(label_list)
      )
      plt.figure()
      plt.yscale("log")
      if 0 in labels:
          plt.hist(
              preds[labels == 0],
              alpha=0.3,
              color="g",
              range=(0, 1),
              bins=50,
              label="false pos.",
          )
      if 1 in labels:
          plt.hist(
              preds[labels == 1],
              alpha=0.3,
              color="b",
              range=(0, 1),
              bins=50,
              label="true pos. (false neg. @ score=0)",
          )
  
      if type_list is not None:
          fp_count = type_list.count("det_fp")
          fn_count = type_list.count("det_fn")
          tp_count = type_list.count("det_tp")
          pos_count = fn_count + tp_count
          title += " tp:{} fp:{} fn:{} pos:{}".format(
              tp_count, fp_count, fn_count, pos_count
          )
  
      plt.legend()
      plt.title(title)
      plt.xlabel("confidence score")
      plt.ylabel("log n")
      plt.savefig(outfile)
      plt.close()
  
file_path: medicaldetectiontoolkit/plotting.py
imports: import matplotlib
  import matplotlib.pyplot
  import matplotlib.gridspec
  import numpy
  import os
  from copy import deepcopy
label_desc: Use image node_id 3 for calling a global function with example usage: plot_prediction_hist(label_list, pred_list, type_list, outfile) without return types