'Constructor for _AugmentedQuery.
Do not call directly. Use the utility functions instead (e.g.
datastore_query.inject_results)
Args:
query: A datastore_query.Query object to augment.
in_memory_results: a list of pre- sorted and filtered result to add to the
stream of datastore results or None .
in_memory_filter: a set of in-memory filters to apply to the datastore
results or None.
max_filtered_count: the maximum number of datastore entities that will be
filtered out by in_memory_filter if known.'

@datastore_rpc._positional(2)
def __init__(self, query, in_memory_results=None, in_memory_filter=None, max_filtered_count=None):

    if (not isinstance(query, Query)):
        raise datastore_errors.BadArgumentError(('query    argument    should    be    datastore_query.Query    (%r)' % (query,)))
    if ((in_memory_filter is not None) and (not isinstance(in_memory_filter, FilterPredicate))):
        raise datastore_errors.BadArgumentError(('in_memory_filter    argument    should    be    ' + ('datastore_query.FilterPredicate    (%r)' % (in_memory_filter,))))
    if ((in_memory_results is not None) and (not isinstance(in_memory_results, list))):
        raise datastore_errors.BadArgumentError(('in_memory_results    argument    should    be    a    list    of' + ('datastore_pv.EntityProto    (%r)' % (in_memory_results,))))
    datastore_types.ValidateInteger(max_filtered_count, 'max_filtered_count', empty_ok=True, zero_ok=True)
    self._query = query
    self._max_filtered_count = max_filtered_count
    self._in_memory_filter = in_memory_filter
    self._in_memory_results = in_memory_results
