code: def plot(results, args):
      import matplotlib.pyplot as plt
  
      max_model_size = sum(
          results["cumulative"][str(NBITS[0])]["metadata"]["sizes"]
      )
      f, ax = plt.subplots(1, 1, figsize=(7, 5))
  
      def compute_x_axis(sizes, nbits, default_nbits):
          max_compression_percent = (
              default_nbits - nbits
          ) / default_nbits
          progress = np.cumsum(sizes)
          normalized_progress = progress / progress.max()
  
          return normalized_progress * max_compression_percent * 100
  
      # Linear 8-bit baseline and the intercept points for mixed-bit recipes
      linear8bit_baseline = results["baselines"]["linear_8bit"]
  
      # Mark the linear 8-bit baseline
      ax.plot(
          8 / args.default_nbits * 100,
          linear8bit_baseline,
          "bx",
          markersize=8,
          label="8-bit (linear quant)",
      )
  
      # Plot the iso-dB line that matches the 8-bit baseline
      ax.plot([0, 100], [linear8bit_baseline] * 2, "--b")
  
      # Plot non-mixed-bit palettization curves
      for idx, nbits in enumerate(NBITS):
          size_keys = compute_x_axis(
              results["cumulative"][str(nbits)]["metadata"]["sizes"],
              nbits,
              args.default_nbits,
          )
          psnr = [
              sum(v) / len(RANDOM_TEST_DATA)  # avg psnr
              for k, v in results["cumulative"][str(nbits)].items()
              if k != "metadata"
          ]
          ax.plot(size_keys, psnr, label=f"{nbits}-bit")
  
      # Plot mixed-bit results
      mixed_palettes = [
          (float(spec.rsplit("_")[1]), psnr)
          for spec, psnr in results["baselines"].items()
          if "recipe" in spec
      ]
      mixedbit_sizes = [
          100.0 * (1.0 - a[0] / args.default_nbits)
          for a in mixed_palettes
      ]
      mixedbit_psnrs = [a[1] for a in mixed_palettes]
      ax.plot(
          mixedbit_sizes,
          mixedbit_psnrs,
          label="mixed-bit",
      )
  
      ax.set_xlabel("Model Size Reduction (%)")
      ax.set_ylabel("Signal Integrity (PSNR in dB)")
      ax.set_title(args.model_version)
      ax.legend()
  
      f.savefig(
          os.path.join(
              args.o,
              f"{args.model_version.replace('/','_')}_psnr_vs_size.png",
          )
      )
  
imports: from collections import OrderedDict
  from copy import deepcopy
  from functools import partial
  import argparse
  import gc
  import json
  import logging
  import numpy
  import os
  from PIL import Image
  from python_coreml_stable_diffusion.torch2coreml import compute_psnr, get_pipeline
  import time
  import torch
  import torch.nn
  import requests
  from tqdm import tqdm, trange
  from coremltools.converters.mil.mil import types
label_desc: Use image node_id 13 for calling a global function with example usage: plot(results, args) and returns: unknown