static Function<TreeCursor, Stream<TreeCursor>> byTypeMapper(TreeType childType) {
        return child -> child.getTree().getType() == childType
                ? Stream.of(child)
                : Stream.empty();
    }
Formats various kinds of brackets, dealing with interspersed whitespace and comments.
smithy-syntax/src/main/java/software/amazon/smithy/syntax/BracketFormatter.java