code: func Discover(machineInfo *cadvisorapi.MachineInfo) (*CPUTopology, error) {
  	if machineInfo.NumCores == 0 {
  		return nil, fmt.Errorf("could not detect number of cpus")
  	}
  
  	CPUDetails := CPUDetails{}
  	numPhysicalCores := 0
  
  	for _, socket := range machineInfo.Topology {
  		numPhysicalCores += len(socket.Cores)
  		for _, core := range socket.Cores {
  			if coreID, err := getUniqueCoreID(core.Threads); err == nil {
  				for _, cpu := range core.Threads {
  					CPUDetails[cpu] = CPUInfo{
  						CoreID:   coreID,
  						SocketID: socket.Id,
  					}
  				}
  			} else {
  				klog.Errorf("could not get unique coreID for socket: %d core %d threads: %v",
  					socket.Id, core.Id, core.Threads)
  				return nil, err
  			}
  		}
  	}
  
  	return &CPUTopology{
  		NumCPUs:    machineInfo.NumCores,
  		NumSockets: len(machineInfo.Topology),
  		NumCores:   numPhysicalCores,
  		CPUDetails: CPUDetails,
  	}, nil
  }
docs: // Discover returns CPUTopology based on cadvisor node info