class_docstr: Mixin class for adding metadata request functionality.
  
  ``BaseEstimator`` inherits from this Mixin.
  
  .. versionadded:: 1.3
class_docstr_tok: ["Mixin","class","for","adding","metadata","request","functionality",".","``","BaseEstimator","``","inherits","from","this","Mixin",".","..","versionadded",":",":","1.3"]
docstr: Build the `MethodMetadataRequest` for a method using its signature.
  
  This method takes all arguments from the method signature and uses
  ``None`` as their default request value, except ``X``, ``y``, ``Y``,
  ``Xt``, ``yt``, ``*args``, and ``**kwargs``.
  
  Parameters
  ----------
  router : MetadataRequest
      The parent object for the created `MethodMetadataRequest`.
  method : str
      The name of the method.
  
  Returns
  -------
  method_request : MethodMetadataRequest
      The prepared request using the method's signature.
docstr_tok: ["Build","the","`","MethodMetadataRequest","`","for","a","method","using","its","signature",".","This","method","takes","all","arguments","from","the","method","signature","and","uses","``","None","``","as","their","default","request","value",",","except","``","X","``",",","``","y","``",",","``","Y","``",",","``","Xt","``",",","``","yt","``",",","``","*","args","``",",","and","``","*","*","kwargs","``",".","Parameters","--","--","--","--","--","router",":","MetadataRequest","The","parent","object","for","the","created","`","MethodMetadataRequest","`",".","method",":","str","The","name","of","the","method",".","Returns","--","--","--","-","method_request",":","MethodMetadataRequest","The","prepared","request","using","the","method","'s","signature","."]
code: def _build_request_for_signature(cls, router, method):
      """Build the `MethodMetadataRequest` for a method using its signature.
  
      This method takes all arguments from the method signature and uses
      ``None`` as their default request value, except ``X``, ``y``, ``Y``,
      ``Xt``, ``yt``, ``*args``, and ``**kwargs``.
  
      Parameters
      ----------
      router : MetadataRequest
          The parent object for the created `MethodMetadataRequest`.
      method : str
          The name of the method.
  
      Returns
      -------
      method_request : MethodMetadataRequest
          The prepared request using the method's signature.
      """
      mmr = MethodMetadataRequest(owner=cls.__name__, method=method)
      # Here we use `isfunction` instead of `ismethod` because calling `getattr`
      # on a class instead of an instance returns an unbound function.
      if not hasattr(cls, method) or not inspect.isfunction(
          getattr(cls, method)
      ):
          return mmr
      # ignore the first parameter of the method, which is usually "self"
      params = list(
          inspect.signature(getattr(cls, method)).parameters.items()
      )[1:]
      for pname, param in params:
          if pname in {"X", "y", "Y", "Xt", "yt"}:
              continue
          if param.kind in {param.VAR_POSITIONAL, param.VAR_KEYWORD}:
              continue
          mmr.add_request(
              param=pname,
              alias=None,
          )
      return mmr
  
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 2 for calling the _MetadataRequester obj's underlying member method code with example usage: obj._build_request_for_signature(cls, router, method) and returns: mmr, mmr