class_docstr: Contains the metadata request info of a consumer.
  
  Instances of `MethodMetadataRequest` are used in this class for each
  available method under `metadatarequest.{method}`.
  
  Consumer-only classes such as simple estimators return a serialized
  version of this class as the output of `get_metadata_routing()`.
  
  .. versionadded:: 1.3
  
  Parameters
  ----------
  owner : str
      The name of the object to which these requests belong.
class_docstr_tok: ["Contains","the","metadata","request","info","of","a","consumer",".","Instances","of","`","MethodMetadataRequest","`","are","used","in","this","class","for","each","available","method","under","`","metadatarequest.","{","method","}","`",".","Consumer-only","classes","such","as","simple","estimators","return","a","serialized","version","of","this","class","as","the","output","of","`","get_metadata_routing","(",")","`",".","..","versionadded",":",":","1.3","Parameters","--","--","--","--","--","owner",":","str","The","name","of","the","object","to","which","these","requests","belong","."]
docstr: Prepare the given parameters to be passed to the method.
  
  The output of this method can be used directly as the input to the
  corresponding method as extra keyword arguments to pass metadata.
  
  Parameters
  ----------
  method : str
      The name of the method for which the parameters are requested and
      routed.
  
  params : dict
      A dictionary of provided metadata.
  
  Returns
  -------
  params : Bunch
      A :class:`~sklearn.utils.Bunch` of {prop: value} which can be given to the
      corresponding method.
docstr_tok: ["Prepare","the","given","parameters","to","be","passed","to","the","method",".","The","output","of","this","method","can","be","used","directly","as","the","input","to","the","corresponding","method","as","extra","keyword","arguments","to","pass","metadata",".","Parameters","--","--","--","--","--","method",":","str","The","name","of","the","method","for","which","the","parameters","are","requested","and","routed",".","params",":","dict","A","dictionary","of","provided","metadata",".","Returns","--","--","--","-","params",":","Bunch","A",":","class",":","`","~sklearn.utils.Bunch","`","of","{","prop",":","value","}","which","can","be","given","to","the","corresponding","method","."]
code: def _route_params(self, *, method, params):
      """Prepare the given parameters to be passed to the method.
  
      The output of this method can be used directly as the input to the
      corresponding method as extra keyword arguments to pass metadata.
  
      Parameters
      ----------
      method : str
          The name of the method for which the parameters are requested and
          routed.
  
      params : dict
          A dictionary of provided metadata.
  
      Returns
      -------
      params : Bunch
          A :class:`~sklearn.utils.Bunch` of {prop: value} which can be given to the
          corresponding method.
      """
      return getattr(self, method)._route_params(params=params)
  
imports: import inspect
  from collections import namedtuple
  from copy import deepcopy
  from typing import TYPE_CHECKING, Optional, Union
  from warnings import warn
  from ..None import get_config
  from ..exceptions import UnsetMetadataPassedError
  from ._bunch import Bunch
label_desc: Use image node_id 5 for calling the MetadataRequest obj's underlying member method code with example usage: obj._route_params() and returns: getattr