def _handle_kernel_died(self, since_last_heartbeat):
self.log.debug("<STR_LIT>", since_last_heartbeat)<EOL>if self.custom_restart:<EOL><INDENT>self.custom_restart_kernel_died.emit(since_last_heartbeat)<EOL><DEDENT>else:<EOL><INDENT>message = '<STR_LIT>''<STR_LIT>''<STR_LIT>' %since_last_heartbeat<EOL>self.restart_kernel(message, now=True)<EOL><DEDENT>
Handle the kernel's death by asking if the user wants to restart.