code: def get_UA(maxValence_list, valence_list):
      """ """
      UA = []
      DU = []
      for i, (maxValence, valence) in enumerate(
          zip(maxValence_list, valence_list)
      ):
          if not maxValence - valence > 0:
              continue
          UA.append(i)
          DU.append(maxValence - valence)
      return UA, DU
  
imports: from rdkit import Chem
  import numpy
  import networkx
  import collections
  from collections import defaultdict
  import itertools
  import copy
  from scipy.spatial import distance_matrix
label_desc: Use image node_id 6 for calling a global function with example usage: get_UA(maxValence_list, valence_list) and returns: UA,  DU