'Return true if child is a descendant of node'

def isAncestorOf(self, node, child):

    currentParent = self.parent(child)
    while ((currentParent != child) and (currentParent is not None)):
        if (node == currentParent):
            return True
        currentParent = self.parent(currentParent)
    return False
