code: def plot_stat_curves(stats, outfile):
      for c in ["roc", "prc"]:
          plt.figure()
          for s in stats:
              if s[c] is not None:
                  plt.plot(s[c][0], s[c][1], label=s["name"] + "_" + c)
          plt.title(outfile.split("/")[-1] + "_" + c)
          plt.legend(loc=3 if c == "prc" else 4)
          plt.xlabel("precision" if c == "prc" else "1-spec.")
          plt.ylabel("recall")
          plt.savefig(outfile + "_" + c)
          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 4 for calling a global function with example usage: plot_stat_curves(stats, outfile) without return types