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