code: def test_collection_filtering():
      """Test that collections works with the kwargs argument."""
  
      class DummyMetric(Metric):
          full_state_update = True
  
          def __init__(self) -> None:
              super().__init__()
  
          def update(self, *args: Any, kwarg: Any):
              pass
  
          def compute(self):
              return
  
      class MyAccuracy(Metric):
          full_state_update = True
  
          def __init__(self) -> None:
              super().__init__()
  
          def update(self, preds, target, kwarg2):
              pass
  
          def compute(self):
              return
  
      mc = MetricCollection([BinaryAccuracy(), DummyMetric()])
      mc2 = MetricCollection([MyAccuracy(), DummyMetric()])
      mc(torch.tensor([0, 1]), torch.tensor([0, 1]), kwarg="kwarg")
      mc2(
          torch.tensor([0, 1]),
          torch.tensor([0, 1]),
          kwarg="kwarg",
          kwarg2="kwarg2",
      )
  
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 10 for calling a global function with example usage: test_collection_filtering() without return types