def METHOD_NAME(self, inputs, metric, functional_metric, ref_metric, ignore_index):
    """Test functional implementation of metric."""
    preds, target = inputs
    if ignore_index is not None:
        target = inject_ignore_index(target, ignore_index)
    self.run_functional_metric_test(
        preds=preds,
        target=target,
        metric_functional=functional_metric,
        reference_metric=partial(_sklearn_ranking, fn=ref_metric, ignore_index=ignore_index),
        metric_args={
            "num_labels": NUM_CLASSES,
            "ignore_index": ignore_index,
        },
    )