def filter_items(items, *args, **kwargs):
    q1 = list(args) if args is not None else []
    q2 = [Q(**kwargs)] if kwargs is not None else []
    lookup_groups = q1 + q2
    pred = lambda item: all(lg.evaluate(item) for lg in lookup_groups)
    return (item for item in items if pred(item))
Filters an iterable using lookup parameters
dataset/ETHPy150Open naiquevin/lookupy/lookupy/lookupy.py/filter_items