class_docstr: Object for monitoring
  
  Must be child of engine
  
  Handles signal messages and watches Engine process for exiting
class_docstr_tok: ["Object","for","monitoring","Must","be","child","of","engine","Handles","signal","messages","and","watches","Engine","process","for","exiting"]
docstr: Notify the Hub that our parent has exited
docstr_tok: ["Notify","the","Hub","that","our","parent","has","exited"]
code: def notify_exit(self):
      """Notify the Hub that our parent has exited"""
      self.log.info("Notifying Hub that our parent has shut down")
      s = self.context.socket(zmq.DEALER)
      # finite, nonzero LINGER to prevent hang without dropping message during exit
      s.LINGER = 3000
      util.connect(
          s,
          self.registration_url,
          curve_serverkey=self.curve_serverkey,
          curve_secretkey=self.curve_secretkey,
          curve_publickey=self.curve_publickey,
      )
      self.session.send(
          s, "unregistration_request", content={"id": self.engine_id}
      )
      s.close()
  
imports: import asyncio
  import logging
  import os
  import pickle
  import signal
  import sys
  from subprocess import PIPE, Popen
  from threading import Thread
  import psutil
  import zmq
  from jupyter_client.session import Session
  from tornado.ioloop import IOLoop
  from traitlets.config import Config
  from zmq.eventloop.zmqstream import ZMQStream
  from ipyparallel import error, util
  from ipyparallel.util import local_logger
label_desc: Use image node_id 4 for calling the KernelNanny obj's underlying member method code with example usage: obj.notify_exit() without return types