def METHOD_NAME(self, inputs, metric, functional_metric, ref_metric, dtype):
    """Test dtype support of the metric on CPU."""
    preds, target = inputs
    if (preds < 0).any() and dtype == torch.half:
        pytest.xfail(reason="torch.sigmoid in metric does not support cpu + half precision")
    if dtype == torch.half and functional_metric == multilabel_ranking_average_precision:
        pytest.xfail(
            reason="multilabel_ranking_average_precision requires torch.unique which is not implemented for half"
        )
    if dtype == torch.half and not _TORCH_GREATER_EQUAL_1_9 and functional_metric == multilabel_coverage_error:
        pytest.xfail(
            reason="multilabel_coverage_error requires torch.min which is only implemented for half"
            " in v1.9 or higher of torch."
        )
    self.run_precision_test_cpu(
        preds=preds,
        target=target,
        metric_module=metric,
        metric_functional=functional_metric,
        metric_args={"num_labels": NUM_CLASSES},
        dtype=dtype,
    )