code: def __call__(
      self, y_true, y_pred, *, sensitive_features, **other_params
  ) -> Union[float, int]:
      sample_params = dict()
      params = dict()
      transform_parameters = dict()
      for k, v in other_params.items():
          if k in self._sample_param_names:
              sample_params[k] = v
          elif k in parameters_for_transforms:
              transform_parameters[k] = v
          else:
              params[k] = v
  
      dispatch_fn = functools.partial(self._metric_fn, **params)
      # Make sure there isn't a subsequent log message about
      # a nameless metric
      bound_fn_name = self._metric_fn.__name__
      for k, v in sorted(params.items()):
          bound_fn_name = bound_fn_name + "_" + k + "_" + str(v)
      dispatch_fn.__name__ = bound_fn_name
  
      all_metrics = MetricFrame(
          metrics=dispatch_fn,
          y_true=y_true,
          y_pred=y_pred,
          sensitive_features=sensitive_features,
          sample_params=sample_params,
      )
  
      if self._transform == "difference":
          result = all_metrics.difference(**transform_parameters)
      elif self._transform == "ratio":
          result = all_metrics.ratio(**transform_parameters)
      elif self._transform == "group_min":
          result = all_metrics.group_min()
      elif self._transform == "group_max":
          result = all_metrics.group_max()
      else:
          raise ValueError(_INVALID_TRANSFORM)
  
      return result
  
imports: import functools
  import inspect
  from typing import Callable, List, Union
  from ._metric_frame import MetricFrame
label_desc: Use image node_id 2 for calling the _DerivedMetric obj's underlying member method code with example usage: obj.__call__(y_true, y_pred) and returns: result