private static @Nullable <T extends RangeMarkerEx> RangeMarkerImpl getAnyNodeMarker(@NotNull IntervalNode<T> node, @NotNull List<? super T> invalidated) {
    List<Supplier<? extends T>> keys = node.intervals;
    for (int i = keys.size() - 1; i >= 0; i--) {
      Supplier<? extends T> key = keys.get(i);
      T t = key.get();
      RangeMarkerImpl marker = (RangeMarkerImpl)t;
      if (marker != null) {
        if (marker.isValid()) return marker;
        // marker can become invalid on its own, e.g., FoldRegion
        node.removeIntervalInternal(i);
        invalidated.add(t);
      }
    }
    return null;
  }
private static @Nullable <T extends RangeMarkerEx> RangeMarkerImpl getAnyNodeMarker(@NotNull IntervalNode<T> node, @NotNull List<? super T> invalidated)