@ancestor.setter
    def ancestor(self, value):
        if not isinstance(value, Key):
            raise TypeError("Ancestor must be a Key")
        self._ancestor = value
Set the ancestor for the query
dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/datastore/query.py/Query.ancestor