def METHOD_NAME(self, f, event='restart'):
    """unregister a callback to fire on a particular event
    Possible values for event:
      'restart' (default): kernel has died, and will be restarted.
      'dead': restart has failed, kernel will be left dead.
    """
    try:
        self.callbacks[event].remove(f)
    except ValueError:
        pass