code: def is_read_only() -> bool:
      """
      True when the current buffer is read only.
      """
      return get_app().current_buffer.read_only()
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, cast
  from prompt_toolkit.application.current import get_app
  from prompt_toolkit.cache import memoized
  from prompt_toolkit.enums import EditingMode
  from .base import Condition
label_desc: Use image node_id 7 for calling a global function with example usage: is_read_only() and returns: get_app