def get_descendants(x, collection=None):
 if (collection is None):
  collection = random_variables()
 node_dict = {node.value(): node for node in collection}
 output = set([])
 nodes = set([x])
 while nodes:
  node = nodes.pop()
  if isinstance(node, RandomVariable):
   node = node.value()
  candidate_node = node_dict.get(node, None)
  if (candidate_node and (candidate_node != x)):
   output.add(candidate_node)
  for op in node.consumers():
   nodes.update(op.outputs)
 return list(output)

def get_descendants ( x , collection = None ) : if ( collection is None ) : collection = random_variables ( ) node_dict = { node . value ( ) : node for node in collection } output = set ( [ ] ) nodes = set ( [ x ] ) while nodes : node = nodes . pop ( ) if isinstance ( node , RandomVariable ) : node = node . value ( ) candidate_node = node_dict . get ( node , None ) if ( candidate_node and ( candidate_node != x ) ) : output . add ( candidate_node ) for op in node . consumers ( ) : nodes . update ( op . outputs ) return list ( output )
returns all descendant executions upto the specified descendant_depth for the supplied actionexecution_id .