class_docstr: Python TaskScheduler object.
  
  This is the simplest object that supports msg_id based
  DAG dependencies. *Only* task msg_ids are checked, not
  msg_ids of jobs submitted via the MUX queue.
class_docstr_tok: ["Python","TaskScheduler","object",".","This","is","the","simplest","object","that","supports","msg_id","based","DAG","dependencies",".","*","Only","*","task","msg_ids","are","checked",",","not","msg_ids","of","jobs","submitted","via","the","MUX","queue","."]
docstr: dispatch register/unregister events.
docstr_tok: ["dispatch","register\/unregister","events","."]
code: def dispatch_notification(self, msg):
      """dispatch register/unregister events."""
      try:
          idents, msg = self.session.feed_identities(msg)
      except ValueError:
          self.log.warning("task::Invalid Message: %r", msg)
          return
      try:
          msg = self.session.deserialize(msg)
      except ValueError:
          self.log.warning(
              "task::Unauthorized message from: %r" % idents
          )
          return
  
      msg_type = msg["header"]["msg_type"]
  
      handler = self._notification_handlers.get(msg_type, None)
      if handler is None:
          self.log.error("Unhandled message type: %r" % msg_type)
      else:
          try:
              handler(msg["content"]["uuid"].encode("utf8"))
          except Exception:
              self.log.error(
                  "task::Invalid notification msg: %r",
                  msg,
                  exc_info=True,
              )
  
imports: import time
  from collections import deque
  from random import randint, random
  from types import FunctionType
  import zmq
  from traitlets import Dict, Enum, Instance, Integer, List, observe
  from ipyparallel import Dependency, error, util
  from ipyparallel.controller.scheduler import Scheduler
label_desc: Use image node_id 6 for calling the TaskScheduler obj's underlying member method code with example usage: obj.dispatch_notification(msg) without return types