def _PopulateFilters(self):
    entity = self._entity
    for prop in entity._properties.itervalues():
      current_value = prop._retrieve_value(entity)

      if prop._repeated:
        if current_value is not None:
          raise ValueError('No queries on repeated values are allowed.')
        continue

      # Only filter for non-null values
      if current_value is not None:
        self._AddFilter(prop == current_value)
Populates filters in query info by using values set on the entity.
dataset/ETHPy150Open GoogleDeveloperExperts/experts-app-backend/endpoints_proto_datastore/ndb/model.py/_EndpointsQueryInfo._PopulateFilters