<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def isAncestorOf(self, other):
    '''Returns whether this Key is an ancestor of `other`.

        >>> john = Key('/Comedy/MontyPython/Actor:JohnCleese')
        >>> Key('/Comedy').isAncestorOf(john)
        True

    '''
    if isinstance(other, Key):
      return other._string.startswith(self._string + '/')
    raise TypeError('%s is not of type %s' % (other, Key))