def METHOD_NAME(prefix, postfix):
    """Test wrapper in combination with metric collection."""
    labels = ["horse", "fish", "cat"]
    metric = MetricCollection(
        {
            "accuracy": ClasswiseWrapper(MulticlassAccuracy(num_classes=3, average=None), labels=labels),
            "recall": ClasswiseWrapper(MulticlassRecall(num_classes=3, average=None), labels=labels),
        },
        prefix=prefix,
        postfix=postfix,
    )
    preds = torch.randn(10, 3).softmax(dim=-1)
    target = torch.randint(3, (10,))
    val = metric(preds, target)
    assert isinstance(val, dict)
    assert len(val) == 6
    def _get_correct_name(base):
        name = base if prefix is None else prefix + base
        return name if postfix is None else name + postfix
    for lab in labels:
        name = _get_correct_name(f"multiclassaccuracy_{lab}")
        assert name in val
        name = _get_correct_name(f"multiclassrecall_{lab}")
        assert name in val