In https://github.com/scikit-image/scikit-image/pull/7007 we have run into https://github.com/scientific-python/lazy_loader/blob/2334bd279d40e0dadd3af48fe4ec494d3ce7f47d/lazy_loader/__init__.py#L204-L206 while trying to apply `lazy_loader.attach_stub` to `skimage.morphology`. That submodule tries to [import and expose `label` from `skimage.measure` again](https://github.com/scikit-image/scikit-image/blob/a7e7f46025006c65418e70ba063b6ddabef35b35/skimage/morphology/__init__.pyi#L64) as a public API function. We can [workaround this by just making this import one level-deeper in a submodule, e.g. `skimage.morphology._util`](https://github.com/scikit-image/scikit-image/pull/7007#discussion_r1221277104). However, I was wondering if this limitation is artificial and could be removed or if this constraint prevents other problems for `lazy_loader`.
In scikit-image/scikit-image#7007 we have run into https://github.com/scientific-python/lazy_loader/blob/2334bd279d40e0dadd3af48fe4ec494d3ce7f47d/lazy_loader/__init__.py#L204-L206
while trying to apply
lazy_loader.attach_stubtoskimage.morphology. That submodule tries to import and exposelabelfromskimage.measureagain as a public API function. We can workaround this by just making this import one level-deeper in a submodule, e.g.skimage.morphology._util.However, I was wondering if this limitation is artificial and could be removed or if this constraint prevents other problems for
lazy_loader.