code: func ResolveActualLRPGroups(lrps []*ActualLRP) []*ActualLRPGroup {
  	mapOfGroups := map[ActualLRPKey]*ActualLRPGroup{}
  	result := []*ActualLRPGroup{}
  	for _, actualLRP := range lrps {
  		// Every actual LRP has potentially 2 rows in the database: one for the instance
  		// one for the evacuating.  When building the list of actual LRP groups (where
  		// a group is the instance and corresponding evacuating), make sure we don't add the same
  		// actual lrp twice.
  		if mapOfGroups[actualLRP.ActualLRPKey] == nil {
  			mapOfGroups[actualLRP.ActualLRPKey] = &ActualLRPGroup{}
  			result = append(result, mapOfGroups[actualLRP.ActualLRPKey])
  		}
  		if actualLRP.Presence == ActualLRP_Evacuating {
  			mapOfGroups[actualLRP.ActualLRPKey].Evacuating = actualLRP
  		} else if hasHigherPriority(actualLRP, mapOfGroups[actualLRP.ActualLRPKey].Instance) {
  			mapOfGroups[actualLRP.ActualLRPKey].Instance = actualLRP
  		}
  	}
  
  	return result
  }
docs: // DEPRECATED
  // ResolveActualLRPGroups convert the given set of lrp instances into
  // ActualLRPGroup.  This conversion is lossy.  A suspect LRP is given
  // precendence over an Ordinary instance if it is Running.  Otherwise, the
  // Ordinary instance is returned in the Instance field of the ActualLRPGroup.