code: public static String convertToUpperUnderscore(String ident) {
  
      ident = LEADING_OR_TRAILING_UNDERSCORE_PATTERN.matcher(ident).replaceAll("");
      ident = WORD_BOUNDARY_IN_IDENT_PATTERN.matcher(ident).replaceAll("_");
      ident = CONSECUTIVE_UNDERSCORES_PATTERN.matcher(ident).replaceAll("_");
      return Ascii.toUpperCase(ident);
    }
docs: Converts an identifier to upper-underscore format. The identifier must start with a letter or
  underscore and must only contain letters, digits, and underscores (i.e. it must match the
  regular expression {@code [A-Za-z_][A-Za-z_0-9]*}).
  
  @param ident The identifier to convert.
  @return The identifier in upper-underscore format.