code: func SortedByGroupAndVersion(servers []*APIService) [][]*APIService {
  	serversByGroupPriorityMinimum := ByGroupPriorityMinimum(servers)
  	sort.Sort(serversByGroupPriorityMinimum)
  
  	ret := [][]*APIService{}
  	for _, curr := range serversByGroupPriorityMinimum {
  		// check to see if we already have an entry for this group
  		existingIndex := -1
  		for j, groupInReturn := range ret {
  			if groupInReturn[0].Spec.Group == curr.Spec.Group {
  				existingIndex = j
  				break
  			}
  		}
  
  		if existingIndex >= 0 {
  			ret[existingIndex] = append(ret[existingIndex], curr)
  			sort.Sort(ByVersionPriority(ret[existingIndex]))
  			continue
  		}
  
  		ret = append(ret, []*APIService{curr})
  	}
  
  	return ret
  }
docs: // SortedByGroupAndVersion sorts APIServices into their different groups, and then sorts them based on their versions.
  // For example, the first element of the first array contains the APIService with the highest version number, in the
  // group with the highest priority; while the last element of the last array contains the APIService with the lowest
  // version number, in the group with the lowest priority.