def ensure_diagnostics_panel(window: sublime.Window): return window.find_output_panel("diagnostics") or create_diagnostics_panel(window)