#NEWLINE# def _unique_descendants( node ) : #NEWLINE# #INDENT# '\n    Returns the list of all nodes descended from the given node, where\n    there is only a single path of descent.\n    ' #NEWLINE# results = [ ] #NEWLINE# current = node #NEWLINE# while ( current and _istree ( current ) and ( len ( current ) == 1 ) ) : #NEWLINE# #INDENT# current = current [ 0 ] #NEWLINE# results . append ( node ) #NEWLINE# #UNINDENT# return results