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