private boolean compareWithScope(AttributeValue scope) {
        // Ensure that each assertion matches, and provide them the scope.
        for (Assertion assertion : assertions) {
            AttributeValue lhs = assertion.lhs.create(scope);
            boolean matchedOneRhs = false;
            for (ScopedFactory factory : assertion.rhs) {
                AttributeValue rhs = factory.create(scope);
                if (assertion.comparator.compare(lhs, rhs, assertion.caseInsensitive)) {
                    matchedOneRhs = true;
                    break;
                }
            }

            if (!matchedOneRhs) {
                return false;
            }
        }

        return true;
    }
Creates an AttributeValue from the given scope value.

<p>This is useful for pathing into scopes.
smithy-model/src/main/java/software/amazon/smithy/model/selector/ScopedAttributeSelector.java