def walk(setbits, unsetbits):
            return sorted(
                k
                for k, v in pycompat.iteritems(expected)
                if ((v[0] & unsetbits) == 0 and (v[0] & setbits) == setbits)
            )