code: def check_valency(mol):
      """
      Checks that no atoms in the mol have exceeded their possible
      valency
      :return: True if no valency issues, False otherwise
      """
      try:
          Chem.SanitizeMol(
              mol, sanitizeOps=Chem.SanitizeFlags.SANITIZE_PROPERTIES
          )
          return True, None
      except ValueError as e:
          e = str(e)
          p = e.find("#")
          e_sub = e[p:]
          atomid_valence = list(map(int, re.findall(r"\d+", e_sub)))
          return False, atomid_valence
  
imports: import re
  import numpy
  from rdkit import Chem
label_desc: Use image node_id 2 for calling a global function with example usage: check_valency(mol) and returns: True,  None, False,  atomid_valence