code: def test_squeeze_argument():
      """Test that the squeeze_outputs argument works as expected."""
      m = MultioutputWrapper(
          ConfusionMatrix(task="binary"), num_outputs=3
      )
      m.update(
          torch.randint(2, (10, 3)), torch.randint(2, (10, 3))
      )  # as args
      m.update(
          preds=torch.randint(2, (10, 3)),
          target=torch.randint(2, (10, 3)),
      )  # as kwargs
      val = m.compute()
      assert val.shape == (3, 2, 2)
  
imports: from functools import partial
  from typing import Any
  import pytest
  import torch
  from sklearn.metrics import accuracy_score
  from sklearn.metrics import r2_score
  from torch import Tensor, tensor
  from torchmetrics import Metric
  from torchmetrics.classification import ConfusionMatrix, MulticlassAccuracy
  from torchmetrics.regression import R2Score
  from torchmetrics.wrappers.multioutput import MultioutputWrapper
  from unittests import BATCH_SIZE, NUM_BATCHES, NUM_CLASSES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 4 for calling a global function with example usage: test_squeeze_argument() without return types