code: def test_nested_routing_conflict():
      # check if an error is raised if there's a conflict between keys
      pipeline = SimplePipeline(
          [
              MetaTransformer(
                  transformer=ConsumingTransformer()
                  .set_fit_request(metadata=True, sample_weight=False)
                  .set_transform_request(sample_weight=True)
              ),
              WeightedMetaRegressor(
                  estimator=ConsumingRegressor().set_fit_request(
                      sample_weight=True
                  )
              ).set_fit_request(sample_weight="outer_weights"),
          ]
      )
      w1, w2 = [1], [2]
      with pytest.raises(
          ValueError,
          match=(
              re.escape(
                  "In WeightedMetaRegressor, there is a conflict on sample_weight between"
                  " what is requested for this estimator and what is requested by its"
                  " children. You can resolve this conflict by using an alias for the"
                  " child estimator(s) requested metadata."
              )
          ),
      ):
          pipeline.fit(
              X,
              y,
              metadata=my_groups,
              sample_weight=w1,
              outer_weights=w2,
          )
  
imports: import re
  import numpy
  import pytest
  from sklearn import config_context
  from sklearn.base import BaseEstimator, clone
  from sklearn.linear_model import LinearRegression
  from sklearn.tests.metadata_routing_common import ConsumingClassifier, ConsumingRegressor, ConsumingTransformer, MetaRegressor, MetaTransformer, NonConsumingClassifier, WeightedMetaClassifier, WeightedMetaRegressor, _Registry, assert_request_equal, assert_request_is_empty, check_recorded_metadata
  from sklearn.utils import metadata_routing
  from sklearn.utils._metadata_requests import COMPOSITE_METHODS, METHODS, SIMPLE_METHODS, MethodMetadataRequest, MethodPair, _MetadataRequester, request_is_alias, request_is_valid
  from sklearn.utils.metadata_routing import MetadataRequest, MetadataRouter, MethodMapping, get_routing_for_object, process_routing
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 11 for calling a global function with example usage: test_nested_routing_conflict() without return types