<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_ancestor(self, node):
 """ If node is ancestor of self Get the difference in level If not, None """

        if self.level <= node.level or self.key[:len(node.key)] != node.key:
            return None
        return self.level - node.level