@Override
    public ContainsShape containsShapeOptimization(Context context, Shape shape) {
        return context.getRootResult(id).contains(shape) ? ContainsShape.YES : ContainsShape.NO;
    }
Root expressions are rooted common subexpressions.

<p>Roots are evaluated eagerly and then the result is retrieved by ID. This prevents needing to evaluate a root
expression over and over for each shape given the result does not vary based on the current shape.
Roots are evaluated in an isolated context, meaning it can't use variables defined outside the root, nor can it
set variables that can be used outside the root.
smithy-model/src/main/java/software/amazon/smithy/model/selector/RootSelector.java