Won't this hit everything inside the engine's `__main__` module?  So if there are `N` objects defined there, this is `O(N)`?

Is there another more direct way to do this without shallow copying all of `__main__`'s contents?