class_docstr: An object for representing a set of msg_id dependencies.
  
  Subclassed from set().
  
  Parameters
  ----------
  dependencies: list/set of msg_ids or AsyncResult objects or output of Dependency.as_dict()
      The msg_ids to depend on
  all : bool [default True]
      Whether the dependency should be considered met when *all* depending tasks have completed
      or only when *any* have been completed.
  success : bool [default True]
      Whether to consider successes as fulfilling dependencies.
  failure : bool [default False]
      Whether to consider failures as fulfilling dependencies.
  
  If `all=success=True` and `failure=False`, then the task will fail with an ImpossibleDependency
      as soon as the first depended-upon task fails.
class_docstr_tok: ["An","object","for","representing","a","set","of","msg_id","dependencies",".","Subclassed","from","set","(",")",".","Parameters","--","--","--","--","--","dependencies",":","list\/set","of","msg_ids","or","AsyncResult","objects","or","output","of","Dependency.as_dict","(",")","The","msg_ids","to","depend","on","all",":","bool","[","default","True","]","Whether","the","dependency","should","be","considered","met","when","*","all","*","depending","tasks","have","completed","or","only","when","*","any","*","have","been","completed",".","success",":","bool","[","default","True","]","Whether","to","consider","successes","as","fulfilling","dependencies",".","failure",":","bool","[","default","False","]","Whether","to","consider","failures","as","fulfilling","dependencies",".","If","`","all=success=True","`","and","`","failure=False","`",",","then","the","task","will","fail","with","an","ImpossibleDependency","as","soon","as","the","first","depended-upon","task","fails","."]
docstr: Represent this dependency as a dict. For json compatibility.
docstr_tok: ["Represent","this","dependency","as","a","dict",".","For","json","compatibility","."]
code: def as_dict(self):
      """Represent this dependency as a dict. For json compatibility."""
      return dict(
          dependencies=list(self),
          all=self.all,
          success=self.success,
          failure=self.failure,
      )
  
file_path: ipyparallel/ipyparallel/controller/dependency.py
imports: from types import ModuleType
  from ipyparallel.client.asyncresult import AsyncResult
  from ipyparallel.error import UnmetDependency
  from ipyparallel.serialize import can
  from ipyparallel.util import interactive
label_desc: Use image node_id 4 for calling the Dependency obj's underlying member method code with example usage: obj.as_dict() and returns: dict