private static @Nullable String getConsoleDisplayName(@NotNull Project project) {
    ToolWindow window = PythonConsoleToolWindow.getInstance(project).getToolWindow();
    final Content content = window.getContentManager().getSelectedContent();
    if (content == null) return null;
    return content.getDisplayName();
  }
private static @Nullable String getConsoleDisplayName(@NotNull Project project)