code: def registry(handlers):
      registry = Registry()
      registry.add_binding(Keys.ControlX, Keys.ControlC)(
          handlers.controlx_controlc
      )
      registry.add_binding(Keys.ControlX)(handlers.control_x)
      registry.add_binding(Keys.ControlD)(handlers.control_d)
      registry.add_binding(Keys.ControlSquareClose, Keys.Any)(
          handlers.control_square_close_any
      )
  
      return registry
  
file_path: catboost/contrib/python/prompt-toolkit/py2/tests/test_key_binding.py
imports: from __future__ import unicode_literals
  from prompt_toolkit.key_binding.input_processor import InputProcessor, KeyPress
  from prompt_toolkit.key_binding.registry import Registry
  from prompt_toolkit.keys import Keys
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: registry(handlers) and returns: registry