BracketFormatter extractChildren(TreeCursor cursor, Function<TreeCursor, Stream<Doc>> extractor) {
        return children(extractor.apply(cursor));
    }
Formats various kinds of brackets, dealing with interspersed whitespace and comments.
smithy-syntax/src/main/java/software/amazon/smithy/syntax/BracketFormatter.java