@Override
        public String apply(Object type, String indent) {
            if (type instanceof String) {
                return StringUtils.capitalize((String) type);
            }
            throw new IllegalArgumentException(
                    "Invalid type provided for $U. Expected a String but found: `"
                            + type + "`.");
        }
Implements a formatter for {@code $U} that capitalizes the first letter of a string literal.
smithy-trait-codegen/src/main/java/software/amazon/smithy/traitcodegen/writer/TraitCodegenWriter.java