code: func (c *PermanodeConstraint) permanodeMatchesAttrVals(ctx context.Context, s *search, vals []string) (bool, error) {
  	if c.NumValue != nil && !c.NumValue.intMatches(int64(len(vals))) {
  		return false, nil
  	}
  	if c.hasValueConstraint() {
  		nmatch := 0
  		for _, val := range vals {
  			match, err := c.permanodeMatchesAttrVal(ctx, s, val)
  			if err != nil {
  				return false, err
  			}
  			if match {
  				nmatch++
  			}
  		}
  		if nmatch == 0 {
  			return false, nil
  		}
  		if c.ValueAll {
  			return nmatch == len(vals), nil
  		}
  	}
  	return true, nil
  }
docs: // permanodeMatchesAttrVals checks that the values in vals - all of them, if c.ValueAll is set -
  // match the values for c.Attr.
  // vals are the current permanode values of c.Attr.