code: func (a *cpuAccumulator) freeCores() []int {
  	socketIDs := a.details.Sockets().ToSlice()
  	sort.Slice(socketIDs,
  		func(i, j int) bool {
  			iCores := a.details.CoresInSocket(socketIDs[i]).Filter(a.isCoreFree)
  			jCores := a.details.CoresInSocket(socketIDs[j]).Filter(a.isCoreFree)
  			return iCores.Size() < jCores.Size() || socketIDs[i] < socketIDs[j]
  		})
  
  	coreIDs := []int{}
  	for _, s := range socketIDs {
  		coreIDs = append(coreIDs, a.details.CoresInSocket(s).Filter(a.isCoreFree).ToSlice()...)
  	}
  	return coreIDs
  }
docs: // Returns core IDs as a slice sorted by:
  // - the number of whole available cores on the socket, ascending
  // - socket ID, ascending
  // - core ID, ascending