code: def _create_plot(tumor, in_glob, out_ext, page=1):
      
      out_dir = utils.safe_makedir("images")
      out_name = os.path.join(out_dir, "%s-%s" % (tumor, out_ext))
      in_file = glob.glob(in_glob)[0]
      cmd = ["pdftoppm", in_file, out_name, "-png", "-f", page, "-singlefile"]
      if not os.path.exists(out_name + ".png"):
          subprocess.check_call([str(x) for x in cmd])
      return out_name + ".png"
docs: Create an output plot for the given PDF in the images directory.