code: def descending_psnr_order(results):
      if "metadata" in results:
          results.pop("metadata")
  
      return OrderedDict(
          sorted(results.items(), key=lambda items: -sum(items[1]))
      )
  
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 10 for calling a global function with example usage: descending_psnr_order(results) and returns: OrderedDict