'Converts a v3 Query to a v1 ancestor PropertyFilter.
Args:
v3_query: a datastore_pb.Query
v1_property_filter: a googledatastore.PropertyFilter to populate'

def _v3_query_to_v1_ancestor_filter(self, v3_query, v1_property_filter):

    v1_property_filter.Clear()
    v1_property_filter.set_operator(googledatastore.PropertyFilter.HAS_ANCESTOR)
    prop = v1_property_filter.property
    prop.set_name(PROPERTY_NAME_KEY)
    self._entity_converter.v3_to_v1_key(v3_query.ancestor(), v1_property_filter.value.mutable_key_value)
