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: a task has become unreachable, send a reply with an ImpossibleDependency
  error.
docstr_tok: ["a","task","has","become","unreachable",",","send","a","reply","with","an","ImpossibleDependency","error","."]
code: def fail_unreachable(self, msg_id, why=error.ImpossibleDependency):
      """a task has become unreachable, send a reply with an ImpossibleDependency
      error."""
      if msg_id not in self.queue_map:
          self.log.error("task %r already failed!", msg_id)
          return
      job = self.queue_map.pop(msg_id)
      # lazy-delete from the queue
      job.removed = True
      for mid in job.dependents:
          if mid in self.graph:
              self.graph[mid].remove(msg_id)
  
      try:
          raise why()
      except:
          content = error.wrap_exception()
      self.log.debug(
          "task %r failing as unreachable with: %s",
          msg_id,
          content["ename"],
      )
  
      self.all_done.add(msg_id)
      self.all_failed.add(msg_id)
  
      msg = self.session.send(
          self.client_stream,
          "apply_reply",
          content,
          parent=job.header,
          ident=job.idents,
      )
      self.session.send(
          self.mon_stream, msg, ident=[b"outtask"] + job.idents
      )
  
      self.update_graph(msg_id, success=False)
  
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 12 for calling the TaskScheduler obj's underlying member method code with example usage: obj.fail_unreachable(msg_id, why) without return types