def is_parent_of(self, node):
    'Checks if this object is a parent of the given node object.'
    if (node.depth <= self.depth):
        return False
    return (node.parent(self.depth) == self)
Checks if this object is a parent of the given node object.
def is_parent_of(self, node):
    
    if (node.depth <= self.depth):
        return False
    return (node.parent(self.depth) == self)