private void findOrCreateNamespaceBrWs(TreeCursor root) {
            // The first use statement could have leading comments that are part of the previous section. If this
            // statement is moved, then the comments from the previous section need to be removed and moved into this
            // section, and potentially replaced with comments from USE_SECTION.
            TreeCursor br = root.findChildrenByType(TreeType.NAMESPACE_STATEMENT)
                    .get(0)
                    .findChildrenByType(TreeType.BR)
                    .get(0);

            namespaceBrWs = br.getFirstChild(TreeType.WS);

            if (namespaceBrWs != null) {
                List<TreeCursor> firstComments = namespaceBrWs.getChildrenByType(TreeType.COMMENT);
                putLeadingComments(ids.get(0), firstComments);
                // Remove these first comments since they get recreated when the use statements are sorted.
                firstComments.forEach(c -> namespaceBrWs.getTree().removeChild(c.getTree()));
            } else {
                // Create an empty WS node since we might need to add comments here later.
                br.getTree().appendChild(TokenTree.of(TreeType.WS));
                namespaceBrWs = br.getFirstChild(TreeType.WS);
            }
        }
Sorts use statements in models alphabetically, case-sensitively.
smithy-syntax/src/main/java/software/amazon/smithy/syntax/SortUseStatements.java