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.
docstr: Serialize the object.
  
  Returns
  -------
  obj : dict
      A serialized version of the instance in the form of a dictionary.
docstr_tok: ["Serialize","the","object",".","Returns","--","--","--","-","obj",":","dict","A","serialized","version","of","the","instance","in","the","form","of","a","dictionary","."]
code: def _serialize(self):
      """Serialize the object.
  
      Returns
      -------
      obj : dict
          A serialized version of the instance in the form of a dictionary.
      """
      output = dict()
      for method in METHODS:
          mmr = getattr(self, method)
          if len(mmr.requests):
              output[method] = mmr._serialize()
      return output
  
imports: import inspect
  from collections import namedtuple
  from copy import deepcopy
  from typing import 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._serialize() and returns: output