def _unique_descendants(node):
 results = []
 current = node
 while (current and _istree(current) and (len(current) == 1)):
  current = current[0]
  results.append(current)
 return results

def _unique_descendants ( node ) : results = [ ] current = node while ( current and _istree ( current ) and ( len ( current ) == 1 ) ) : current = current [ 0 ] results . append ( current ) return results
returns the list of all nodes descended from the given node .