code: def test_using_metriccollection(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
  
file_path: torchmetrics/tests/unittests/wrappers/test_classwise.py
imports: import pytest
  import torch
  from torchmetrics import MetricCollection
  from torchmetrics.classification import MulticlassAccuracy, MulticlassF1Score, MulticlassRecall
  from torchmetrics.wrappers import ClasswiseWrapper
label_desc: Use image node_id 6 for calling a global function with example usage: test_using_metriccollection(prefix, postfix) and returns: unknown