code: func (r *Registry) WithLock(obj mo.Reference, f func()) {
  	if enableLocker {
  		mu := r.locker(obj)
  		mu.Lock()
  		defer mu.Unlock()
  	}
  	f()
  }
docs: // WithLock holds a lock for the given object while then given function is run.