class_docstr: Statemachine that receives :class:`KeyPress` instances and according to the
  key bindings in the given :class:`Registry`, calls the matching handlers.
  
  ::
  
      p = InputProcessor(registry)
  
      # Send keys into the processor.
      p.feed(KeyPress(Keys.ControlX, ''))
      p.feed(KeyPress(Keys.ControlC, '')
  
      # Process all the keys in the queue.
      p.process_keys()
  
      # Now the ControlX-ControlC callback will be called if this sequence is
      # registered in the registry.
  
  :param registry: `BaseRegistry` instance.
  :param cli_ref: weakref to `CommandLineInterface`.
class_docstr_tok: ["Statemachine","that","receives",":","class",":","`","KeyPress","`","instances","and","according","to","the","key","bindings","in","the","given",":","class",":","`","Registry","`",",","calls","the","matching","handlers",".",":",":","p","=","InputProcessor","(","registry",")","#","Send","keys","into","the","processor",".","p.feed","(","KeyPress","(","Keys.ControlX",",","'\u0018","'",")",")","p.feed","(","KeyPress","(","Keys.ControlC",",","'\u0003","'",")","#","Process","all","the","keys","in","the","queue",".","p.process_keys","(",")","#","Now","the","ControlX-ControlC","callback","will","be","called","if","this","sequence","is","#","registered","in","the","registry",".",":","param","registry",":","`","BaseRegistry","`","instance",".",":","param","cli_ref",":","weakref","to","`","CommandLineInterface","`","."]
docstr: For a list of :class:`KeyPress` instances. Return True if there is any
  handler that is bound to a suffix of this keys.
docstr_tok: ["For","a","list","of",":","class",":","`","KeyPress","`","instances",".","Return","True","if","there","is","any","handler","that","is","bound","to","a","suffix","of","this","keys","."]
code: def _is_prefix_of_longer_match(self, key_presses):
      """
      For a list of :class:`KeyPress` instances. Return True if there is any
      handler that is bound to a suffix of this keys.
      """
      keys = tuple(k.key for k in key_presses)
      cli = self._cli_ref()
  
      # Get the filters for all the key bindings that have a longer match.
      # Note that we transform it into a `set`, because we don't care about
      # the actual bindings and executing it more than once doesn't make
      # sense. (Many key bindings share the same filter.)
      filters = set(
          b.filter
          for b in self._registry.get_bindings_starting_with_keys(keys)
      )
  
      # When any key binding is active, return True.
      return any(f(cli) for f in filters)
  
imports: from __future__ import unicode_literals
  from prompt_toolkit.buffer import EditReadOnlyBuffer
  from prompt_toolkit.filters.cli import ViNavigationMode
  from prompt_toolkit.keys import Keys, Key
  from prompt_toolkit.utils import Event
  from .registry import BaseRegistry
  from collections import deque
  from six.moves import range
  import weakref
  import six
label_desc: Use image node_id 7 for calling the InputProcessor obj's underlying member method code with example usage: obj._is_prefix_of_longer_match(key_presses) and returns: any