The best way would be to use the import hook. There's an import hook that will automatically add these decorators while during the import. So you don't have to alter your code at all. But there are some open issues with that import hook, like somebody reported that this import hook is installed too late that the modules in question were already imported. That's something I have yet to fix or find a workaround for.