code: def test_common_prefix(processor, handlers):
      with set_dummy_app():
          # Sending Control_X should not yet do anything, because there is
          # another sequence starting with that as well.
          processor.feed(KeyPress(Keys.ControlX, ""))
          processor.process_keys()
  
          assert handlers.called == []
  
          # When another key is pressed, we know that we did not meant the longer
          # "ControlX ControlC" sequence and the callbacks are called.
          processor.feed(KeyPress(Keys.ControlD, ""))
          processor.process_keys()
  
          assert handlers.called == ["control_x", "control_d"]
  
imports: from __future__ import annotations
  from contextlib import contextmanager
  import pytest
  from prompt_toolkit.application import Application
  from prompt_toolkit.application.current import set_app
  from prompt_toolkit.input.defaults import create_pipe_input
  from prompt_toolkit.key_binding.key_bindings import KeyBindings
  from prompt_toolkit.key_binding.key_processor import KeyPress, KeyProcessor
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.layout import Layout, Window
  from prompt_toolkit.output import DummyOutput
label_desc: Use image node_id 9 for calling a global function with example usage: test_common_prefix(processor, handlers) without return types