def METHOD_NAME(self, event):
    """fire our callbacks for a particular event"""
    for callback in self.callbacks[event]:
        try:
            callback()
        except Exception as e:
            self.log.error("KernelRestarter: %s callback %r failed", event, callback, exc_info=True)