pcdsutils.import_timer.get_import_chain
- pcdsutils.import_timer.get_import_chain(module_to_import: str, submodule_to_chain: str) list[str][source]
For a given import, figure out why a specific submodule is being imported.
The return value is a list of modules that import each other in order, starting with the module you imported and ending with the submodule you’re trying to track down.
- Parameters:
- module_to_importstr
The module you are trying to import.
- submodule_to_chainstr
The submodule that gets imported that you need to track down.
- Returns:
- module_chainlist of str
The modules that import each other in order, starting with the module you imported and ending with the submodule you’re trying to track down.