code: def test_metric_collection_prefix_postfix_args(prefix, postfix):
      """Test that the prefix arg alters the keywords in the output."""
      m1 = DummyMetricSum()
      m2 = DummyMetricDiff()
      names = ["DummyMetricSum", "DummyMetricDiff"]
      names = [prefix + n if prefix is not None else n for n in names]
      names = [n + postfix if postfix is not None else n for n in names]
  
      metric_collection = MetricCollection(
          [m1, m2], prefix=prefix, postfix=postfix
      )
  
      # test forward
      out = metric_collection(5)
      for name in names:
          assert (
              name in out
          ), "prefix or postfix argument not working as intended with forward method"
  
      # test compute
      out = metric_collection.compute()
      for name in names:
          assert (
              name in out
          ), "prefix or postfix argument not working as intended with compute method"
  
      # test clone
      new_metric_collection = metric_collection.clone(
          prefix="new_prefix_"
      )
      out = new_metric_collection(5)
      names = [
          n[len(prefix) :] if prefix is not None else n for n in names
      ]  # strip away old prefix
      for name in names:
          assert (
              f"new_prefix_{name}" in out
          ), "prefix argument not working as intended with clone method"
  
      for k in new_metric_collection:
          assert "new_prefix_" in k
  
      for k in new_metric_collection.keys(keep_base=False):
          assert "new_prefix_" in k
  
      for k in new_metric_collection.keys(keep_base=True):
          assert "new_prefix_" not in k
  
      assert isinstance(
          new_metric_collection.keys(keep_base=True),
          type(new_metric_collection.keys(keep_base=False)),
      )
      assert isinstance(
          new_metric_collection.items(keep_base=True),
          type(new_metric_collection.items(keep_base=False)),
      )
  
      new_metric_collection = new_metric_collection.clone(
          postfix="_new_postfix"
      )
      out = new_metric_collection(5)
      names = [
          n[: -len(postfix)] if postfix is not None else n
          for n in names
      ]  # strip away old postfix
      for name in names:
          assert (
              f"new_prefix_{name}_new_postfix" in out
          ), "postfix argument not working as intended with clone method"
  
imports: import pickle
  from copy import deepcopy
  from typing import Any
  import pytest
  import torch
  from torchmetrics import Metric, MetricCollection
  from torchmetrics.classification import BinaryAccuracy, MulticlassAccuracy, MulticlassAUROC, MulticlassAveragePrecision, MulticlassCohenKappa, MulticlassConfusionMatrix, MulticlassF1Score, MulticlassMatthewsCorrCoef, MulticlassPrecision, MulticlassRecall, MultilabelAUROC, MultilabelAveragePrecision
  from torchmetrics.utilities.checks import _allclose_recursive
  from unittests.helpers import seed_all
  from unittests.helpers.testers import DummyMetricDiff, DummyMetricMultiOutputDict, DummyMetricSum
label_desc: Use image node_id 5 for calling a global function with example usage: test_metric_collection_prefix_postfix_args(prefix, postfix) without return types