@RequiresEdt
  public static @NotNull ProgressIndicator executeAndTryWait(@NotNull Function<? super ProgressIndicator, /*@NotNull*/ ? extends Runnable> backgroundTask,
                                                             @Nullable Runnable onSlowAction) {
    return executeAndTryWait(backgroundTask, onSlowAction,
                             ProgressIndicatorWithDelayedPresentation.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS, false);
  }
@RequiresEdt
  public static @NotNull ProgressIndicator executeAndTryWait(@NotNull Function<? super ProgressIndicator, /*@NotNull*/ ? extends Runnable> backgroundTask,
                                                             @Nullable Runnable onSlowAction)