class_docstr: Key binding registry.
docstr: Remove a key binding.
  
  This expects a function that was given to `add_binding` method as
  parameter. Raises `ValueError` when the given function was not
  registered before.
docstr_tok: ["Remove","a","key","binding",".","This","expects","a","function","that","was","given","to","`","add_binding","`","method","as","parameter",".","Raises","`","ValueError","`","when","the","given","function","was","not","registered","before","."]
code: def remove_binding(self, function):
      """
      Remove a key binding.
  
      This expects a function that was given to `add_binding` method as
      parameter. Raises `ValueError` when the given function was not
      registered before.
      """
      assert callable(function)
  
      for b in self.key_bindings:
          if b.handler == function:
              self.key_bindings.remove(b)
              self._clear_cache()
              return
  
      # No key binding found for this function. Raise ValueError.
      raise ValueError("Binding not found: %r" % (function,))
  
imports: from __future__ import unicode_literals
  from abc import ABCMeta, abstractmethod
  from prompt_toolkit.cache import SimpleCache
  from prompt_toolkit.filters import CLIFilter, to_cli_filter, Never
  from prompt_toolkit.keys import Key, Keys
  from six import text_type, with_metaclass
label_desc: Use image node_id 4 for calling the Registry obj's underlying member method code with example usage: obj.remove_binding(function) without return types