code: def getPriorityStrict(element):
      
      prio_str = element.get('priority')
      if prio_str is not None:
          prio_val = int(prio_str)
          if prio_val >= 0:
              return prio_val
          else:
              raise ValueError('Priority values must be non-negative integers')
  
      # Any errors in parsing the priority fall through to here
      return Max
docs: Get the priority of this element.
  
      Raises ValueError if the value of the priority is invalid. If no
      priority is specified, it returns a value that compares greater
      than any other value.