code: def sort_dict(x: dict, reverse=True):
      """Sort dictionary by values.
  
      Returns
      -------
      Dict: sorted dictionary
      """
      return dict(
          sorted(x.items(), key=lambda item: item[1], reverse=reverse)
      )
  
label_desc: Use image node_id 2 for calling a global function with example usage: sort_dict(x, reverse) and returns: dict