public static @NotNull Runnable createMessageDialogRemover(@Nullable Project project) {
    Window projectWindow = project == null ? null : WindowManager.getInstance().suggestParentWindow(project);
    return () -> SwingUtilities.invokeLater(() -> {
      makeCurrentMessageDialogGoAway(projectWindow == null ? Window.getWindows() : projectWindow.getOwnedWindows());
    });
  }
public static @NotNull Runnable createMessageDialogRemover(@Nullable Project project)