private void recursiveFindChildren(TreeCursor cursor, List<TreeCursor> cursors, Predicate<TreeCursor> predicate) {
        for (TreeCursor tree : cursor.getChildren()) {
            if (predicate.test(tree)) {
                cursors.add(tree);
            }
            recursiveFindChildren(tree, cursors, predicate);
        }
    }
Recursively finds every node in the tree that matches the given predicate.

@param predicate Predicate to test each recursive child against.
@return Returns the matching tree cursors, or an empty list if none are found.
smithy-syntax/src/main/java/software/amazon/smithy/syntax/TreeCursor.java