Inaccurate error message for parameter passing in Pipeline with enable_metadata_routing=True

### Describe the issue linked to the documentation

**The following error message is inaccurate:** 

```
Passing extra keyword arguments to Pipeline.transform is only supported if enable_metadata_routing=True, which you can set using sklearn.set_config.  
```

**This can easily be done using `**params` as described in the documentation for sklearn.pipeline:** https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline.fit 

**Please consider the following example:**

```py
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.pipeline import Pipeline
from scipy.sparse import csr_matrix
import pandas as pd
import numpy as np

class DummyTransformer(BaseEstimator, TransformerMixin):
    def __init__(self):
        self.feature_index_sec = None  # initialize attribute

    def transform(self, X, feature_index_sec=None, **fit_params):
        if feature_index_sec is None:
            raise ValueError("Missing required argument 'feature_index_sec'.")
            
        print(f"Transform Received feature_index_sec with shape: {feature_index_sec.shape}")
        return X

    def fit(self, X, y=None, feature_index_sec=None, **fit_params):
        print(f"Fit Received feature_index_sec with shape: {feature_index_sec.shape}")
        return self

    def fit_transform(self, X, y=None, feature_index_sec=None, **fit_params):
        self.fit(X, y, feature_index_sec, **fit_params)  # feature_index_sec is passed with other parameters
        return self.transform(X, feature_index_sec, **fit_params)

feature_matrix = csr_matrix(np.random.rand(10, 5))
train_idx = pd.DataFrame({'FileDate_ClosingPrice': np.random.rand(10)})

transformer = DummyTransformer()
pipe = Pipeline(steps=[('DummyTransformer', transformer)])

pipe.fit_transform(feature_matrix, DummyTransformer__feature_index_sec=train_idx)

# this line creates the error
pipe.transform(feature_matrix, DummyTransformer__feature_index_sec=train_idx)

```
**Which outputs:**

```
Fit Received feature_index_sec with shape: (10, 1)
Transform Received feature_index_sec with shape: (10, 1)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
File /tmp/test.py:35
     32 pipe.fit_transform(feature_matrix, DummyTransformer__feature_index_sec=train_idx)
     34 # this line creates the error
---> 35 pipe.transform(feature_matrix, DummyTransformer__feature_index_sec=train_idx)

File ~/micromamba/lib/python3.12/site-packages/sklearn/pipeline.py:896, in Pipeline.transform(self, X, **params)
    863 @available_if(_can_transform)
    864 def transform(self, X, **params):
    865     """Transform the data, and apply `transform` with the final estimator.
    866 
    867     Call `transform` of each transformer in the pipeline. The transformed
   (...)
    894         Transformed data.
    895     """
--> 896     _raise_for_params(params, self, "transform")
    898     # not branching here since params is only available if
    899     # enable_metadata_routing=True
    900     routed_params = process_routing(self, "transform", **params)

File ~/micromamba/lib/python3.12/site-packages/sklearn/utils/_metadata_requests.py:158, in _raise_for_params(params, owner, method)
    154 caller = (
    155     f"{owner.__class__.__name__}.{method}" if method else owner.__class__.__name__
    156 )
    157 if not _routing_enabled() and params:
--> 158     raise ValueError(
    159         f"Passing extra keyword arguments to {caller} is only supported if"
    160         " enable_metadata_routing=True, which you can set using"
    161         " `sklearn.set_config`. See the User Guide"
    162         " <https://scikit-learn.org/stable/metadata_routing.html> for more"
    163         f" details. Extra parameters passed are: {set(params)}"
    164     )

ValueError: Passing extra keyword arguments to Pipeline.transform is only supported if enable_metadata_routing=True, which you can set using `sklearn.set_config`. See the User Guide <https://scikit-learn.org/stable/metadata_routing.html> for more details. Extra parameters passed are: {'DummyTransformer__feature_index_sec'}
```

**Request**

- The error message should be updated to clarify that parameters can already be passed using the **params (e.g., StepName__param_name) syntax, which is unrelated to metadata routing.
- Additionally, I was unable to find any example of using enable_metadata_routing=True to pass parameters, either in the documentation or in the wild. It would be helpful if the documentation provided a working example of passing parameters using metadata routing, especially for custom transformers.

### Suggest a potential alternative/fix

_No response_

COMMENT:
**Things that do not make sense:** 

1. **.transform() will receive **params via .fit_transform().  However, it will throw this error when called directly:** "ValueError: Passing extra keyword arguments to Pipeline.transform is only supported if enable_metadata_routing=True, which you can set using `sklearn.set_config`. See the User Guide <https://scikit-learn.org/stable/metadata_routing.html> for more details. Extra parameters passed are: {'DummyTransformer__feature_index_sec'}"
2. Following the error message above, if you add enable_metadata_routing=True (uncomment the lines below), you will get "TypeError: Pipeline.fit_transform got unexpected argument(s) {'DummyTransformer__feature_index_sec'}, which are not routed to any object."  
3. The documentation for [Metadata Routing](https://scikit-learn.org/stable/auto_examples/miscellaneous/plot_metadata_routing.html#sphx-glr-auto-examples-miscellaneous-plot-metadata-routing-py) is anything but clear.  For example, ChatGPT cannot draft a proper answer for how to pass feature_index_sec to DummyTransformer.transform() below even when you provide it the Metadata Routing documentation.   

**Code to Reproduce Error Messages**
```py
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.pipeline import Pipeline
from scipy.sparse import csr_matrix
import pandas as pd
import numpy as np

#from sklearn import set_config
#set_config(enable_metadata_routing=True)

class DummyTransformer(BaseEstimator, TransformerMixin):
    def __init__(self):
        self.feature_index_sec = None  # initialize attribute

    def transform(self, X, feature_index_sec=None, **fit_params):
        if feature_index_sec is None:
            raise ValueError("Missing required argument 'feature_index_sec'.")
            
        print(f"Transform Received feature_index_sec with shape: {feature_index_sec.shape}")
        return X

    def fit(self, X, y=None, feature_index_sec=None, **fit_params):
        print(f"Fit Received feature_index_sec with shape: {feature_index_sec.shape}")
        return self

    def fit_transform(self, X, y=None, feature_index_sec=None, **fit_params):
        self.fit(X, y, feature_index_sec, **fit_params)  # feature_index_sec is passed with other parameters
        return self.transform(X, feature_index_sec, **fit_params)

feature_matrix = csr_matrix(np.random.rand(10, 5))
train_idx = pd.DataFrame({'FileDate_ClosingPrice': np.random.rand(10)})

transformer = DummyTransformer()
pipe = Pipeline(steps=[('DummyTransformer', transformer)])

# This passes **params to transform() 
pipe.fit_transform(feature_matrix, DummyTransformer__feature_index_sec=train_idx)

# This fails validation and produces the error
pipe.transform(feature_matrix, DummyTransformer__feature_index_sec=train_idx)
```

**Simple Example: How to Implement Metadata Routing**

**BaseEstimator Now Inherits from _MetadataRequester:**

Scikit-learn's BaseEstimator inherits from _MetadataRequester, which provides a suite of methods for defining metadata routing:
- set_fit_request
- set_transform_request
- Other similar methods like set_predict_request, set_score_request, etc.

**Three Steps for Using Metadata Routing:**
1. Enable metadata routing globally with set_config(enable_metadata_routing=True).
2. Create an instance of the estimator or transformer and call the appropriate set_*_request methods to define which metadata is expected.
3. Pass **params  and the proper metadata variable (like feature_index_sec) to the fit, transform, or other relevant methods.

**Working Example with DummyTransformer:**
The DummyTransformer below prints out the metadata received in its fit and transform methods.

**Simple Metadata Routing Code Example**

```py
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.pipeline import Pipeline
from scipy.sparse import csr_matrix
import pandas as pd
import numpy as np

from sklearn import set_config
set_config(enable_metadata_routing=True)

class DummyTransformer(BaseEstimator, TransformerMixin):
    def __init__(self):
        self.feature_index_sec = None  # initialize attribute

    def transform(self, X, feature_index_sec=None, **fit_params):
        if feature_index_sec is None:
            raise ValueError("Missing required argument 'feature_index_sec'.")
            
        print(f"Transform Received feature_index_sec with shape: {feature_index_sec.shape}")
        return X

    def fit(self, X, y=None, feature_index_sec=None, **fit_params):
        print(f"Fit Received feature_index_sec with shape: {feature_index_sec.shape}")
        return self

    def fit_transform(self, X, y=None, feature_index_sec=None, **fit_params):
        self.fit(X, y, feature_index_sec, **fit_params)  # feature_index_sec is passed with other parameters
        return self.transform(X, feature_index_sec, **fit_params)

feature_matrix = csr_matrix(np.random.rand(10, 5))
train_idx = pd.DataFrame({'FileDate_ClosingPrice': np.random.rand(10)})

transformer = (
    DummyTransformer()
    .set_fit_request(feature_index_sec=True)
    .set_transform_request(feature_index_sec=True)
)

pipe = Pipeline(steps=[('DummyTransformer', transformer)])

# Test routing metadata via .fit_transform() and .transform() methods
pipe.fit_transform(feature_matrix, feature_index_sec=train_idx)
pipe.transform(feature_matrix, feature_index_sec=train_idx)
```

**Outputs**

Fit Received feature_index_sec with shape: (10, 1)
Transform Received feature_index_sec with shape: (10, 1)
Transform Received feature_index_sec with shape: (10, 1)
<10x5 sparse matrix of type '<class 'numpy.float64'>'
	with 50 stored elements in Compressed Sparse Row format>

Labels: Documentation