code: func (l VirtualDeviceList) PickController(kind types.BaseVirtualController) types.BaseVirtualController {
  	l = l.SelectByType(kind.(types.BaseVirtualDevice)).Select(func(device types.BaseVirtualDevice) bool {
  		num := len(device.(types.BaseVirtualController).GetVirtualController().Device)
  
  		switch device.(type) {
  		case types.BaseVirtualSCSIController:
  			return num < 15
  		case *types.VirtualIDEController:
  			return num < 2
  		case *types.VirtualNVMEController:
  			return num < 8
  		default:
  			return true
  		}
  	})
  
  	if len(l) == 0 {
  		return nil
  	}
  
  	return l[0].(types.BaseVirtualController)
  }
docs: // PickController returns a controller of the given type(s).
  // If no controllers are found or have no available slots, then nil is returned.