public void run(final @Nullable Map<String, String> env, final @Nullable ConsoleView consoleView) throws ExecutionException {
    final ProcessHandler process = createProcess(env);
    final Project project = myModule.getProject();
    stopProcessWhenAppClosed(process);
    process.putUserData(ToolWindowContentExtractor.SYNC_TAB_TO_GUEST, true);
    new RunContentExecutor(project, process)
      .withFilter(new PythonTracebackFilter(project))
      .withConsole(consoleView)
      .withTitle(myRunTabTitle)
      .withRerun(() -> {
        try {
          process.destroyProcess(); // Stop process before rerunning it
          if (process.waitFor(TIME_TO_WAIT_PROCESS_STOP)) {
            this.run(env, consoleView);
          }
          else {
            Messages.showErrorDialog(PyBundle.message("unable.to.stop"), myRunTabTitle);
          }
        }
        catch (ExecutionException e) {
          Messages.showErrorDialog(e.getMessage(), myRunTabTitle);
        }
      })
      .withStop(() -> process.destroyProcess(), () -> !process.isProcessTerminated()
      )
      .withAfterCompletion(() -> {
        if (process.getExitCode() != null && process.getExitCode() == 0) {
          myAfterCompletion.run();
        }
      })
      .withHelpId(myHelpId)
      .run();
  }
public void run(final @Nullable Map<String, String> env, final @Nullable ConsoleView consoleView)