code: func (mem *Memory) Query(keyvals map[string]string) ([]*rspb.Release, error) {
  	defer unlock(mem.rlock())
  
  	var lbs labels
  
  	lbs.init()
  	lbs.fromMap(keyvals)
  
  	var ls []*rspb.Release
  	for _, recs := range mem.cache {
  		recs.Iter(func(_ int, rec *record) bool {
  			// A query for a release name that doesn't exist (has been deleted)
  			// can cause rec to be nil.
  			if rec == nil {
  				return false
  			}
  			if rec.lbs.match(lbs) {
  				ls = append(ls, rec.rls)
  			}
  			return true
  		})
  	}
  	return ls, nil
  }
docs: // Query returns the set of releases that match the provided set of labels