A module for lazy loading of Python modules
copied from cf-staging / lazy_importlazy_import
provides a set of functions that load modules, and related attributes, in a lazy fashion.
This allows deferring of ImportErrors
to actual module use-time. Likewise, actual module
initialization only takes place at use-time. This is useful when using optional
dependencies with heavy loading times and/or footprints, since that cost is
only paid if the module is actually used.
For minimal impact to other code running in the same session lazy_import
functionality is implemented without the use of import hooks.