def addImportedModule(imported_module):
    key = (
        Utils.relpath(imported_module.getFilename()),
        imported_module.getFullName()
    )

    if key in imported_modules:
        assert imported_module is imported_modules[key], key
    else:
        Plugins.onModuleDiscovered(imported_module)

    imported_modules[key] = imported_module
    imported_by_name[imported_module.getFullName()] = imported_module

    # We don't expect that to happen.
    assert not imported_module.isMainModule()
dataset/ETHPy150Open kayhayen/Nuitka/nuitka/importing/ImportCache.py/addImportedModule/original