code: def BO_is_OK(BO, AC, DU, valences):
      """
      Sanity of bond-orders
  
      args:
          BO -
          AC -
          charge -
          DU -
  
  
      optional
          allow_charges_fragments -
  
  
      returns:
          boolean - true of molecule is OK, false if not
      """
  
      if not valences_not_too_large(BO, valences):
          return False
  
      check_sum = (BO - AC).sum() == sum(DU)
  
      if check_sum:
          return True
  
      return False
  
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 9 for calling a global function with example usage: BO_is_OK(BO, AC, DU, valences) and returns: False, False, True