def filter2(func):
    return lambda arg,value2: set(x for (x,y) in func(arg) if y == value2)
Given a function of one argument returning a generator of
dataset/ETHPy150Open Microsoft/ivy/src/ivy/ivy_utils.py/filter2