r"""Loads module specified by name and path. Args: name: module name. path: module path.
(name: str, path: str)
| 7 | |
| 8 | |
| 9 | def load_module(name: str, path: str) -> types.ModuleType: |
| 10 | r"""Loads module specified by name and path. |
| 11 | |
| 12 | Args: |
| 13 | name: module name. |
| 14 | path: module path. |
| 15 | """ |
| 16 | spec = importlib.util.spec_from_file_location(name, path) |
| 17 | module = importlib.util.module_from_spec(spec) |
| 18 | spec.loader.exec_module(module) |
| 19 | return module |
| 20 | |
| 21 | |
| 22 | def check_module_exists(module: str) -> bool: |