code: func hasHigherPriority(lrp1, lrp2 *ActualLRP) bool {
  	if lrp1 == nil {
  		return false
  	}
  
  	if lrp2 == nil {
  		return true
  	}
  
  	if lrp1.Presence == ActualLRP_Ordinary {
  		switch lrp1.State {
  		case ActualLRPStateRunning:
  			return true
  		case ActualLRPStateClaimed:
  			return lrp2.State != ActualLRPStateRunning && lrp2.State != ActualLRPStateClaimed
  		}
  	} else if lrp1.Presence == ActualLRP_Suspect {
  		switch lrp1.State {
  		case ActualLRPStateRunning:
  			return lrp2.State != ActualLRPStateRunning
  		case ActualLRPStateClaimed:
  			return lrp2.State != ActualLRPStateRunning
  		}
  	}
  	// Cases where we are comparing two LRPs with the same presence have undefined behavior since it shouldn't happen
  	// with the way they're stored in the database
  	return false
  }
docs: // hasHigherPriority returns true if lrp1 takes precendence over lrp2