private InternalSelector parseVariable() {
        ws();

        if (peek() == '{') {
            skip();
            ws();
            String variableName = ParserUtils.parseIdentifier(this);
            ws();
            expect('}');
            return new VariableGetSelector(variableName);
        }

        String name = ParserUtils.parseIdentifier(this);
        ws();
        expect('(');
        ws();
        InternalSelector selector = AndSelector.of(recursiveParse());
        ws();
        expect(')');

        return new VariableStoreSelector(name, selector);
    }
Filter out unnecessary identity selectors when creating the finalized AST to evaluate selectors.
smithy-model/src/main/java/software/amazon/smithy/model/selector/SelectorParser.java