#NEWLINE# def in_subtree( self , component ) : #NEWLINE# #INDENT# '\n        Convenience method that checks if the given *component*\n        is in the subtree that is about to be detached.\n        ' #NEWLINE# while True : #NEWLINE# #INDENT# if ( component == self . args [ 0 ] ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if ( component == component . root ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# component = self . parent