code: def ancestor(self, value):
          
          if not isinstance(value, Key):
              raise TypeError("Ancestor must be a Key")
          self._ancestor = value
docs: Set the ancestor for the query
  
          :type value: :class:`~google.cloud.datastore.key.Key`
          :param value: the new ancestor key