def in_query(expression):
    def _in(index, expression=expression):
        """Return store key for documents that satisfy expression."""
        ev = expression() if callable(expression) else expression
        try:
            iter(ev)
        except TypeError:
            raise AttributeError('$in argument must be an iterable!')
        hashed_ev = [index.get_hash_for(v) for v in ev]
        store_keys = set()

        for value in hashed_ev:
            store_keys |= set(index.get_keys_for(value))

        return list(store_keys)

    return _in
The main issues with django's default json serializer is that properties that
dataset/ETHPy150Open adewes/blitzdb/blitzdb/backends/file/queries.py/in_query--crossover with--dataset/ETHPy150Open klipstein/dojango/dojango/util/__init__.py/json_encode