PR #22548 breaks documentation building

### Describe the bug

The changes made in #22548 appear to cause building the example docs with `make html` to fail (the docs build fine in the previous commit).

### Steps/Code to Reproduce

1. Setup a [development environment for scikit-learn](https://github.com/data-umbrella/event-transcripts/blob/main/2020/05-andreas-mueller-contributing.md)
1. Install [additional packages](https://scikit-learn.org/stable/developers/contributing.html#documentation) to build the documentation
1. Navigate to `scikit-learn/doc` in your development environment and run `make html`

### Expected Results

Documentation build completes successfully.

### Actual Results

```
Running Sphinx v4.4.0

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "M:\Anaconda\envs\sklearndev\lib\site-packages\sphinx\config.py", line 340, in eval_config_file
    exec(code, namespace)
  File "M:\Projects\scikit-learn\doc\conf.py", line 408, in <module>
    from sklearn.experimental import enable_iterative_imputer  # noqa
  File "m:\projects\scikit-learn\sklearn\experimental\enable_iterative_imputer.py", line 15, in <module>
    from ..impute._iterative import IterativeImputer
  File "m:\projects\scikit-learn\sklearn\impute\__init__.py", line 5, in <module>
    from ._knn import KNNImputer
  File "m:\projects\scikit-learn\sklearn\impute\_knn.py", line 11, in <module>
    from ..neighbors._base import _get_weights
  File "m:\projects\scikit-learn\sklearn\neighbors\__init__.py", line 17, in <module>
    from ._nca import NeighborhoodComponentsAnalysis
  File "m:\projects\scikit-learn\sklearn\neighbors\_nca.py", line 19, in <module>
    from ..decomposition import PCA
  File "m:\projects\scikit-learn\sklearn\decomposition\__init__.py", line 12, in <module>
    from ._sparse_pca import SparsePCA, MiniBatchSparsePCA
  File "m:\projects\scikit-learn\sklearn\decomposition\_sparse_pca.py", line 9, in <module>
    from ..linear_model import ridge_regression
  File "m:\projects\scikit-learn\sklearn\linear_model\__init__.py", line 32, in <module>
    from ._glm import PoissonRegressor, GammaRegressor, TweedieRegressor
  File "m:\projects\scikit-learn\sklearn\linear_model\_glm\__init__.py", line 3, in <module>
    from .glm import (
  File "m:\projects\scikit-learn\sklearn\linear_model\_glm\glm.py", line 14, in <module>
    from ..._loss.glm_distribution import TweedieDistribution
  File "m:\projects\scikit-learn\sklearn\_loss\__init__.py", line 6, in <module>
    from .loss import (
  File "m:\projects\scikit-learn\sklearn\_loss\loss.py", line 21, in <module>
    from ._loss import (
ImportError: cannot import name 'CyHalfTweedieLossIdentity' from 'sklearn._loss._loss' (m:\projects\scikit-learn\sklearn\_loss\_loss.cp39-win_amd64.pyd)
```

### Versions

```shell
System:
    python: 3.9.7 (default, Sep 16 2021, 16:59:28) [MSC v.1916 64 bit (AMD64)]
executable: M:\Anaconda\envs\sklearndev\python.exe
   machine: Windows-10-10.0.19044-SP0

Python dependencies:
      sklearn: 1.1.dev0
          pip: 21.2.4
   setuptools: 58.0.4
        numpy: 1.21.5
        scipy: 1.7.3
       Cython: 0.29.25
       pandas: 1.4.1
   matplotlib: 3.5.1
       joblib: 1.1.0
threadpoolctl: 3.1.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: mkl
         prefix: mkl_rt
       filepath: M:\Anaconda\envs\sklearndev\Library\bin\mkl_rt.1.dll
        version: 2021.4-Product
threading_layer: intel
    num_threads: 4

       user_api: openmp
   internal_api: openmp
         prefix: vcomp
       filepath: C:\Windows\System32\vcomp140.dll
        version: None
    num_threads: 8
```

COMMENT:
maybe clean your repo first also. ``make clean`` or ``git clean -xdf``

Labels: Bug, Needs Triage