code: func getNextUnitNumber(devices object.VirtualDeviceList, c types.BaseVirtualController) (int32, error) {
  	var takenUnitNumbers [SCSIDeviceSlots]bool
  	takenUnitNumbers[SCSIReservedSlot] = true
  	key := c.GetVirtualController().Key
  
  	for _, device := range devices {
  		d := device.GetVirtualDevice()
  		if d.ControllerKey == key {
  			if d.UnitNumber != nil {
  				takenUnitNumbers[*d.UnitNumber] = true
  			}
  		}
  	}
  	for unitNumber, takenUnitNumber := range takenUnitNumbers {
  		if !takenUnitNumber {
  			return int32(unitNumber), nil
  		}
  	}
  	return -1, fmt.Errorf("SCSI Controller with key=%d does not have any available slots", key)
  }
docs: // getNextUnitNumber gets the next available SCSI controller unit number from given list of Controller Device List