def filenameToModule(fn):
    if not os.path.exists(fn):
        raise ValueError("%r doesn't exist" % (fn,))
    try:
        ret = reflect.namedAny(reflect.filenameToModuleName(fn))
    except (ValueError, AttributeError):
        # Couldn't find module.  The file 'fn' is not in PYTHONPATH
        return _importFromFile(fn)
    # ensure that the loaded module matches the file
    retFile = os.path.splitext(ret.__file__)[0] + '.py'
    # not all platforms (e.g. win32) have os.path.samefile
    same = getattr(os.path, 'samefile', samefile)
    if os.path.isfile(fn) and not same(fn, retFile):
        del sys.modules[ret.__name__]
        ret = _importFromFile(fn)
    return ret
Returns the module name of the migrations module for this
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/trial/runner.py/filenameToModule--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/South-1.0.2/south/migration/base.py/Migrations.migrations_module