static InternalSelector of(List<InternalSelector> selectors) {
        switch (selectors.size()) {
            case 0:
                return InternalSelector.IDENTITY;
            case 1:
                // If there's only a single selector, then no need to wrap.
                return selectors.get(0);
            case 2:
                return new IntermediateAndSelector(selectors.get(0), selectors.get(1));
            default:
                InternalSelector result = selectors.get(selectors.size() - 1);
                for (int i = selectors.size() - 2; i >= 0; i--) {
                    result = new IntermediateAndSelector(selectors.get(i), result);
                }
                return result;
        }
    }
Maps input over a list of functions, passing the result of each to
the next.

<p>The list of selectors is short-circuited if any selector returns
an empty result (by virtue of a selector not forwarding a shape to
the next selector).
smithy-model/src/main/java/software/amazon/smithy/model/selector/AndSelector.java