private static void execute(@NotNull RunProfileState profileState, @NotNull Runnable runnable) {
    var clientIdRunnable = ClientId.decorateRunnable(runnable);
    if (profileState instanceof PythonCommandLineState) {
      AppExecutorUtil.getAppExecutorService().execute(clientIdRunnable);
    } else {
      ApplicationManager.getApplication().invokeAndWait(clientIdRunnable);
    }
  }
private static void execute(@NotNull RunProfileState profileState, @NotNull Runnable runnable)