docs: public static String extractPackageFromStackTraceElement(StackTraceElement element) {
          String className = element.getClassName();
          int lastDotIndex = className.lastIndexOf(".");
          String packageName;
          if (lastDotIndex > 0) {
              packageName = className.substring(0, lastDotIndex);
          } else {
              packageName = className;
          }
          return packageName;
      }