def remove_binding(self, function):
        assert callable(function)

        for b in self.key_bindings:
            if b.handler == function:
                self.key_bindings.remove(b)
                self._keys_to_bindings[b.keys].remove(b)

                for i in range(1, len(b.keys)):
                    self._keys_to_bindings_suffixes[b.keys[:i]].remove(b)

                return

        # No key binding found for this function. Raise ValueError.
        raise ValueError('Binding not found: %r' % (function, ))
Accepts or declines project invitation
dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/prompt_toolkit/key_binding/registry.py/Registry.remove_binding--crossover with--dataset/ETHPy150Open jasonhancock/cloudstack-python-client/CloudStack/Client.py/Client.deleteProjectInvitation