def _resolve_import(name):
    """Helper function for resolve_import."""
    if name in sys.modules:
        return getattr(sys.modules[name], '__file__', name + '.so')
    return _resolve_import_versioned(name)