def _Q(filter_, thing):
    """ underlying machinery for Q function recursion """
    T = type(thing)
    if isinstance({}, T):
        for k,v in compat.iteritems(thing):
            #print(k,v)
            if filter_ == k:
                if isinstance(v, type([])):
                    yield iter(v)
                else:
                    yield v

            if (type({}),type([]))  in type(v):
                yield Q(filter_,v)

    elif isinstance([], T):
        for k in thing:
            #print(k)
            yield Q(filter_,k)

    else:
        # no recursion.
        pass
dataset/ETHPy150Open pydata/pandas/scripts/json_manip.py/_Q/swapped operands of `in`