code: def load_emacs_open_in_editor_bindings():
      """
      Pressing C-X C-E will open the buffer in an external editor.
      """
      registry = Registry()
  
      registry.add_binding(
          Keys.ControlX,
          Keys.ControlE,
          filter=EmacsMode() & ~HasSelection(),
      )(get_by_name("edit-and-execute-command"))
  
      return registry
  
file_path: catboost/contrib/python/prompt-toolkit/py2/prompt_toolkit/key_binding/bindings/emacs.py
imports: from __future__ import unicode_literals
  from prompt_toolkit.buffer import SelectionType, indent, unindent
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.enums import IncrementalSearchDirection, SEARCH_BUFFER, SYSTEM_BUFFER
  from prompt_toolkit.filters import Condition, EmacsMode, HasSelection, EmacsInsertMode, HasFocus, HasArg
  from prompt_toolkit.completion import CompleteEvent
  from .scroll import scroll_page_up, scroll_page_down
  from .named_commands import get_by_name
  from ..registry import Registry, ConditionalRegistry
label_desc: Use image node_id 2 for calling a global function with example usage: load_emacs_open_in_editor_bindings() and returns: registry