code: 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)f 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))
docs: Returns whether this Key is an ancestor of `other`.
  
          >>> john = Key('/Comedy/MontyPython/Actor:JohnCleese')
          >>> Key('/Comedy').isAncestorOf(john)
          True