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: handle a real task result, either success or failure
docstr_tok: ["handle","a","real","task","result",",","either","success","or","failure"]
code: def handle_result(self, idents, parent, raw_msg, success=True):
      """handle a real task result, either success or failure"""
      # first, relay result to client
      engine = idents[0]
      client = idents[1]
      # swap_ids for ROUTER-ROUTER mirror
      raw_msg[:2] = [client, engine]
      # print (map(str, raw_msg[:4]))
      self.client_stream.send_multipart(raw_msg, copy=False)
      # now, update our data structures
      msg_id = parent["msg_id"]
      self.pending[engine].pop(msg_id)
      if success:
          self.completed[engine].add(msg_id)
          self.all_completed.add(msg_id)
      else:
          self.failed[engine].add(msg_id)
          self.all_failed.add(msg_id)
      self.all_done.add(msg_id)
      self.destinations[msg_id] = engine
  
      self.update_graph(msg_id, success)
  
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 18 for calling the TaskScheduler obj's underlying member method code with example usage: obj.handle_result(idents, parent, raw_msg, success) without return types