def METHOD_NAME(
    inputs: metric_types.StandardMetricInputs,
    **kwargs) -> Iterator[Tuple[np.ndarray, np.ndarray, np.ndarray]]:
  if 'predictions' in inputs:
    modified_inputs = copy.deepcopy(inputs)
    modified_inputs['labels'] = modified_inputs['predictions']
  else:
    modified_inputs = inputs
  return metric_util.to_label_prediction_example_weight(modified_inputs,
                                                        **kwargs)