class_docstr: Wraps functions to make them callable with a DataFrame argument.
  
  The :class:`MetricFrame` makes extensive use of `pandas` DataFrames
  internally. In particular, combinations of sensitive (and control)
  features are selected using `DataFrame.groupby()` and acted on via
  `DataFrame.apply()`. The net result of this is that it is useful
  to have a function wrapper which can be invoked with a DataFrame
  argument, and extract its arguments from that DataFrame.
  
  Parameters
  ----------
  func : callable
      The metric function we wish to invoke
  name: str
      An optional string defining the name of the function
  positional_argument_names: List[str]
      The column names to be extracted and passed as positional arguments
      when invoking the function
  kw_argument_mapping: Dict[str, str]
      The column names which are to be passed as keyword arguments
      when invoking the function. Since the DataFrame column names may
      not match the function's argument names, this is a dictionary
      where the keys are the function argument names, and the values
      are the column names
code: def __init__(
      self,
      *,
      func: Callable,
      name: Optional[str],
      positional_argument_names: List[str] = None,
      kw_argument_mapping: Dict[str, str] = None,
  ):
      if func is None:
          raise ValueError(_METRIC_FUNCTION_NONE)
      if not callable(func):
          raise ValueError(_METRIC_FUNCTION_NOT_CALLABLE)
      self.func = func
  
      if name is None:
          if hasattr(func, "__name__"):
              self.name = func.__name__
          else:
              warnings.warn("Supplied 'func' had no __name__ attribute")
              self.name = _DEFAULT_NAME
      else:
          self.name = name
  
      self.func = func
      self.postional_argument_names = ["y_true", "y_pred"]
      if positional_argument_names is not None:
          self.postional_argument_names = positional_argument_names
      self.kw_argument_mapping = dict()
      if kw_argument_mapping is not None:
          self.kw_argument_mapping = kw_argument_mapping
  
imports: import logging
  import warnings
  from typing import Callable, Dict, List, Optional
  import numpy
  import pandas
label_desc: Use image node_id 1 to create a new AnnotatedMetricFunction object  with example: obj = AnnotatedMetricFunction()