code: def remove(self, name, func):
          ''' Remove a callback from a hook. '''
          was_empty = self._empty()
          if name in self.hooks and func in self.hooks[name]:
              self.hooks[name].remove(func)
          if self.app and not was_empty and self._empty(): self.app.reset(f remove(self, name, func):
          ''' Remove a callback from a hook. '''
          was_empty = self._empty()
          if name in self.hooks and func in self.hooks[name]:
              self.hooks[name].remove(func)
          if self.app and not was_empty and self._empty(): self.app.reset()
docs: Remove a callback from a hook.