def _descendants(node):
 try:
  treepos = node.treepositions()
 except AttributeError:
  return []
 return [node[x] for x in treepos[1:]]

def _descendants ( node ) : try : treepos = node . treepositions ( ) except AttributeError : return [ ] return [ node [ x ] for x in treepos [ 1 : ] ]
returns the list of all nodes which are descended from the given tree node in some way .