prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Consistently use lazy loading for all `skimage.*` submodules
  ### Description:
  
  With `lazy_loader` successfully being used for `skimage`, `skimage.data` and `skimage.filters` why not use it for every of our public submodules? I see no significant disadvantage here (when using the approach with PYI files) and it is what is proposed in [SPEC 1](https://scientific-python.org/specs/spec-0001/).
  
  Feel free to remove the good first issue label if there are concerns. Otherwise I would suggest to tackle this with separate PRs for each module that copy the examples mentioned above.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `skimage/metrics/__init__.py`
  Content:
  ```
  1 from ._adapted_rand_error import adapted_rand_error
  2 from ._contingency_table import contingency_table
  3 from ._structural_similarity import structural_similarity
  4 from ._variation_of_information import variation_of_information
  5 from .set_metrics import hausdorff_distance, hausdorff_pair
  6 from .simple_metrics import (
  7     mean_squared_error,
  8     normalized_mutual_information,
  9     normalized_root_mse,
  10     peak_signal_noise_ratio,
  11 )
  12 
  13 __all__ = [
  14     "adapted_rand_error",
  15     "variation_of_information",
  16     "contingency_table",
  17     "mean_squared_error",
  18     "normalized_mutual_information",
  19     "normalized_root_mse",
  20     "peak_signal_noise_ratio",
  21     "structural_similarity",
  22     "hausdorff_distance",
  23     "hausdorff_pair",
  24 ]
  25
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/skimage/metrics/__init__.py b/skimage/metrics/__init__.py
  --- a/skimage/metrics/__init__.py
  +++ b/skimage/metrics/__init__.py
  @@ -1,24 +1,3 @@
  -from ._adapted_rand_error import adapted_rand_error
  -from ._contingency_table import contingency_table
  -from ._structural_similarity import structural_similarity
  -from ._variation_of_information import variation_of_information
  -from .set_metrics import hausdorff_distance, hausdorff_pair
  -from .simple_metrics import (
  -    mean_squared_error,
  -    normalized_mutual_information,
  -    normalized_root_mse,
  -    peak_signal_noise_ratio,
  -)
  +import lazy_loader as lazy
   
  -__all__ = [
  -    "adapted_rand_error",
  -    "variation_of_information",
  -    "contingency_table",
  -    "mean_squared_error",
  -    "normalized_mutual_information",
  -    "normalized_root_mse",
  -    "peak_signal_noise_ratio",
  -    "structural_similarity",
  -    "hausdorff_distance",
  -    "hausdorff_pair",
  -]
  +__getattr__, __dir__, __all__ = lazy.attach_stub(__name__, __file__)
  
verification_info: {"golden_diff": "diff --git a/skimage/metrics/__init__.py b/skimage/metrics/__init__.py\n--- a/skimage/metrics/__init__.py\n+++ b/skimage/metrics/__init__.py\n@@ -1,24 +1,3 @@\n-from ._adapted_rand_error import adapted_rand_error\n-from ._contingency_table import contingency_table\n-from ._structural_similarity import structural_similarity\n-from ._variation_of_information import variation_of_information\n-from .set_metrics import hausdorff_distance, hausdorff_pair\n-from .simple_metrics import (\n-    mean_squared_error,\n-    normalized_mutual_information,\n-    normalized_root_mse,\n-    peak_signal_noise_ratio,\n-)\n+import lazy_loader as lazy\n \n-__all__ = [\n-    \"adapted_rand_error\",\n-    \"variation_of_information\",\n-    \"contingency_table\",\n-    \"mean_squared_error\",\n-    \"normalized_mutual_information\",\n-    \"normalized_root_mse\",\n-    \"peak_signal_noise_ratio\",\n-    \"structural_similarity\",\n-    \"hausdorff_distance\",\n-    \"hausdorff_pair\",\n-]\n+__getattr__, __dir__, __all__ = lazy.attach_stub(__name__, __file__)\n", "issue": "Consistently use lazy loading for all `skimage.*` submodules\n### Description:\r\n\r\nWith `lazy_loader` successfully being used for `skimage`, `skimage.data` and `skimage.filters` why not use it for every of our public submodules? I see no significant disadvantage here (when using the approach with PYI files) and it is what is proposed in [SPEC 1](https://scientific-python.org/specs/spec-0001/).\r\n\r\nFeel free to remove the good first issue label if there are concerns. Otherwise I would suggest to tackle this with separate PRs for each module that copy the examples mentioned above.\n", "before_files": [{"content": "from ._adapted_rand_error import adapted_rand_error\nfrom ._contingency_table import contingency_table\nfrom ._structural_similarity import structural_similarity\nfrom ._variation_of_information import variation_of_information\nfrom .set_metrics import hausdorff_distance, hausdorff_pair\nfrom .simple_metrics import (\n    mean_squared_error,\n    normalized_mutual_information,\n    normalized_root_mse,\n    peak_signal_noise_ratio,\n)\n\n__all__ = [\n    \"adapted_rand_error\",\n    \"variation_of_information\",\n    \"contingency_table\",\n    \"mean_squared_error\",\n    \"normalized_mutual_information\",\n    \"normalized_root_mse\",\n    \"peak_signal_noise_ratio\",\n    \"structural_similarity\",\n    \"hausdorff_distance\",\n    \"hausdorff_pair\",\n]\n", "path": "skimage/metrics/__init__.py"}], "after_files": [{"content": "import lazy_loader as lazy\n\n__getattr__, __dir__, __all__ = lazy.attach_stub(__name__, __file__)\n", "path": "skimage/metrics/__init__.py"}]}