Collection<Node> execute(Node node) {
        Queue<Node> previousResult = new ArrayDeque<>();

        if (queries.isEmpty()) {
            return previousResult;
        }

        previousResult.add(node);
        for (Query query : queries) {
            // Each time a query runs, it adds to the queue, but we only want it to
            // run on the nodes added by the previous query.
            for (int i = previousResult.size(); i > 0; i--) {
                query.run(previousResult.poll(), previousResult);
            }
        }

        return previousResult;
    }
Searches {@link Node}s to find matching children. Each search
condition is executed on the result of the previous search,
and the results are aggregated.
smithy-model/src/main/java/software/amazon/smithy/model/neighbor/NodeQuery.java