Context manager to profile imports.
Defined in the profiler module.
with profile_imports() as profiler: import heavy_module print(profiler.get_imports())