def _get_import_type(module):
    if module in module_cache:
        return module_cache[module]

    def cache_type(module_type):
        module_cache[module] = module_type
        return module_type

    # Check static stdlib list
    if py2_stdlib in module:
        return cache_type('stdlib')

    # Check if the module is local
    try:
        _find_module(module, ['.'])
        # If the previous line succeeded then it must be a project module
        return cache_type('project')
    except ImportError:
        pass

    # Otherwise treat it as third-party - this means we may treat some stdlib
    # modules as third-party, but that's okay because we are allowing
    # third-party libs in the stdlib section.
    return cache_type('third-party')
dataset/ETHPy150Open openstack/sahara/sahara/utils/hacking/import_checks.py/_get_import_type/swapped operands of `in`