private boolean matchesAssertions(Shape shape, Map<String, Set<Shape>> vars) {
        // First resolve the scope of the assertions.
        AttributeValue scope = AttributeValue.shape(shape, vars).getPath(path);

        // If it's not present, then nothing could ever match.
        if (!scope.isPresent()) {
            return false;
        }

        // When dealing with a projection, each flattened projection value is
        // used as a scope and then passed to the assertions one at a time.
        for (AttributeValue value : scope.getFlattenedValues()) {
            if (compareWithScope(value)) {
                return true;
            }
        }

        return false;
    }
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