<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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)