code: def get_class_weight(node):
      
      weight = 0
  
      if check_node_attributes(CLS_WEIGHT_NEGATIVE, node, "class"):
          weight -= 25
      if check_node_attributes(CLS_WEIGHT_POSITIVE, node, "class"):
          weight += 25
  
      if check_node_attributes(CLS_WEIGHT_NEGATIVE, node, "id"):
          weight -= 25
      if check_node_attributes(CLS_WEIGHT_POSITIVE, node, "id"):
          weight += 25
  
      return weight
docs: Computes weight of element according to its class/id.
  
      We're using sets to help efficiently check for existence of matches.