code: def test_metric_tracker_and_collection_multioutput(
      input_to_tracker, assert_type
  ):
      """Check that MetricTracker support wrapper inputs and nested structures."""
      tracker = MetricTracker(input_to_tracker)
      for _ in range(5):
          tracker.increment()
          for _ in range(5):
              preds, target = torch.randn(100, 2), torch.randn(100, 2)
              tracker.update(preds, target)
      all_res = tracker.compute_all()
      assert isinstance(all_res, assert_type)
      best_metric, which_epoch = tracker.best_metric(return_step=True)
      if isinstance(best_metric, dict):
          for v in best_metric.values():
              assert v is None
          for v in which_epoch.values():
              assert v is None
      else:
          assert best_metric is None
          assert which_epoch is None
  
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 5 for calling a global function with example usage: test_metric_tracker_and_collection_multioutput(input_to_tracker, assert_type) without return types