code: def test_raises_error_on_wrong_input():
      """Make sure that input type errors are raised on the wrong input."""
      with pytest.raises(
          TypeError, match="Metric arg need to be an instance of a .*"
      ):
          MetricTracker([1, 2, 3])
  
      with pytest.raises(
          ValueError,
          match="Argument `maximize` should either be a single bool or list of bool",
      ):
          MetricTracker(MeanAbsoluteError(), maximize=2)
  
      with pytest.raises(
          ValueError,
          match="The len of argument `maximize` should match the length of the metric collection",
      ):
          MetricTracker(
              MetricCollection(
                  [MeanAbsoluteError(), MeanSquaredError()]
              ),
              maximize=[False, False, False],
          )
  
      with pytest.raises(
          ValueError,
          match="Argument `maximize` should be a single bool when `metric` is a single Metric",
      ):
          MetricTracker(MeanAbsoluteError(), maximize=[False])
  
file_path: torchmetrics/tests/unittests/wrappers/test_tracker.py
imports: import pytest
  import torch
  from torchmetrics import MetricCollection
  from torchmetrics.classification import MulticlassAccuracy, MulticlassConfusionMatrix, MulticlassPrecision, MulticlassRecall
  from torchmetrics.regression import MeanAbsoluteError, MeanSquaredError
  from torchmetrics.wrappers import MetricTracker, MultioutputWrapper
  from unittests.helpers import seed_all
label_desc: Use image node_id 1 for calling a global function with example usage: test_raises_error_on_wrong_input() without return types