boolean (@Nullable ConsoleCommunication communication) { if (communication != null) { return ApplicationManager.getApplication().getService(CommandQueueForPythonConsoleService.class).isEmpty(communication); } return true; }