@flake8ext
def check_assertempty(logical_line, filename):
    if filename in 'neutron/tests/':
        msg = ("N330: Use assertEqual(*empty*, observed) instead of "
               "assertEqual(observed, *empty*). *empty* contains "
               "{}, [], (), set(), '', \"\"")
        empties = r"(\[\s*\]|\{\s*\}|\(\s*\)|set\(\s*\)|'\s*'|\"\s*\")"
        reg = r"assertEqual\(([^,]*,\s*)+?%s\)\s*$" % empties
        if re.search(reg, logical_line):
            yield (0, msg)
dataset/ETHPy150Open openstack/neutron/neutron/hacking/checks.py/check_assertempty/swapped operands of `in`