def check_greenthread_spawns(logical_line, physical_line, filename):
    msg = ("N340: Use nova.utils.%(spawn)s() rather than "
           "greenthread.%(spawn)s() and eventlet.%(spawn)s()")
    if "nova/utils.py" in filename or "nova/tests/" in filename:
        return

    match = re.match(spawn_re, logical_line)

    if match:
        yield (0, msg % {'spawn': match.group('spawn_part')})
Check for use of greenthread.spawn(), greenthread.spawn_n(),
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/hacking/checks.py/check_greenthread_spawns