'Converts a v3 Query to a v4 ancestor PropertyFilter.
Args:
v3_query: a datastore_pb.Query
v4_property_filter: a datastore_v4_pb.PropertyFilter to populate'

def _v3_query_to_v4_ancestor_filter(self, v3_query, v4_property_filter):

    v4_property_filter.Clear()
    v4_property_filter.set_operator(datastore_v4_pb.PropertyFilter.HAS_ANCESTOR)
    prop = v4_property_filter.mutable_property()
    prop.set_name(PROPERTY_NAME_KEY)
    self._entity_converter.v3_to_v4_key(v3_query.ancestor(), v4_property_filter.mutable_value().mutable_key_value())
