code: func (svmMap *serviceVMMap) decrementRefCount(id string) (_ *serviceVM, lastRef bool, _ error) {
  	svmMap.Lock()
  	defer svmMap.Unlock()
  
  	svm, ok := svmMap.svms[id]
  	if !ok {
  		return nil, false, errVMUnknown
  	}
  	if svm.refCount == 0 {
  		return svm.svm, false, errVMisTerminating
  	}
  	svm.refCount--
  	return svm.svm, svm.refCount == 0, nil
  }
docs: // decrementRefCount decrements the ref count of the given ID from the map. There are four cases:
  // 	- entry doesn't exist:
  // 		- return errVMUnknown
  //  - entry does exist but the ref count is 0
  //		- return the svm and errVMisTerminating. Caller can call svm.getStopError() to wait for stop
  //	- entry does exist but ref count is 1
  //  	- return vm and set lastRef to true. The caller can then stop the vm, delete the id from this map
  //      - and execute svm.signalStopFinished to signal the threads that the svm has been terminated.
  //	- entry does exist and ref count > 1
  //		- just reduce ref count and return svm