docs: private static String sanitizeName(String name) {
          StringBuilder ret = new StringBuilder();
          int underscores = 0;
          boolean lastWasADot = false;
          for (char c : name.toCharArray()) {
              if (c == '_') {
                  underscores++;
                  // Only _ in a row are allowed
                  if (underscores <= 2) {
                      ret.append(c);
                  }
                  continue;
              }
  
              if (c == '.') {
                  // Only one dot in a row is allowed
                  if (!lastWasADot) {
                      ret.append(c);
                  }
                  lastWasADot = true;
                  continue;
              }
  
              underscores = 0;
              lastWasADot = false;
              if (Character.isLetter(c) || Character.isDigit(c) || c == '-') {
                  ret.append(c);
              }
          }
  
          // All characters must be lowercase
          return ret.toString().toLowerCase();
      }