docs: private void clean(Set<Throwable> seenThrowables) {
      // Stack trace cleaning can be disabled using a system property.
      if (isStackTraceCleaningDisabled()) {
        return;
      }
  
      /*
       * TODO(cpovirk): Consider wrapping this whole method in a try-catch in case there are any bugs.
       * It would be a shame for us to fail to report the "real" assertion failure because we're
       * instead reporting a bug in Truth's cosmetic stack cleaning.
       */
  
      // Prevent infinite recursion if there is a reference cycle between Throwables.
      if (seenThrowables.contains(throwable)) {
        return;
      }
      seenThrowables.add(throwable);
  
      StackTraceElement[] stackFrames = throwable.getStackTrace();
  
      int stackIndex = stackFrames.length - 1;
      for (; stackIndex >= 0 && !isTruthEntrance(stackFrames[stackIndex]); stackIndex--) {
        // Find first frame that enters Truth's world, and remove all above.
      }
      stackIndex += 1;
  
      int endIndex = 0;
      for (;
          endIndex < stackFrames.length && !isJUnitIntrastructure(stackFrames[endIndex]);
          endIndex++) {
        // Find last frame of setup frames, and remove from there down.
      }
      /*
       * If the stack trace would be empty, the error was probably thrown from "JUnit infrastructure"
       * frames. Keep those frames around (though much of JUnit itself and related startup frames will
       * still be removed by the remainder of this method) so that the user sees a useful stack.
       */
      if (!(stackIndex < endIndex)) {
        endIndex = stackFrames.length;
      }
  
      for (; stackIndex < endIndex; stackIndex++) {
        StackTraceElementWrapper stackTraceElementWrapper =
            new StackTraceElementWrapper(stackFrames[stackIndex]);
        // Always keep frames that might be useful.
        if (stackTraceElementWrapper.getStackFrameType() == StackFrameType.NEVER_REMOVE) {
          endStreak();
          cleanedStackTrace.add(stackTraceElementWrapper);
          continue;
        }
  
        // Otherwise, process the current frame for collapsing
        addToStreak(stackTraceElementWrapper);
  
        lastStackFrameElementWrapper = stackTraceElementWrapper;
      }
  
      // Close out the streak on the bottom of the stack.
      endStreak();
  
      // Filter out testing framework and reflective calls from the bottom of the stack
      ListIterator<StackTraceElementWrapper> iterator =
          cleanedStackTrace.listIterator(cleanedStackTrace.size());
      while (iterator.hasPrevious()) {
        StackTraceElementWrapper stackTraceElementWrapper = iterator.previous();
        if (stackTraceElementWrapper.getStackFrameType() == StackFrameType.TEST_FRAMEWORK
            || stackTraceElementWrapper.getStackFrameType() == StackFrameType.REFLECTION) {
          iterator.remove();
        } else {
          break;
        }
      }
  
      // Replace the stack trace on the Throwable with the cleaned one.
      StackTraceElement[] result = new StackTraceElement[cleanedStackTrace.size()];
      for (int i = 0; i < result.length; i++) {
        result[i] = cleanedStackTrace.get(i).getStackTraceElement();
      }
      throwable.setStackTrace(result);
  
      // Recurse on any related Throwables that are attached to this one
      if (throwable.getCause() != null) {
        new StackTraceCleaner(throwable.getCause()).clean(seenThrowables);
      }
      for (Throwable suppressed : Platform.getSuppressed(throwable)) {
        new StackTraceCleaner(suppressed).clean(seenThrowables);
      }
    }