code: def test_test_on_batch(self):
      self.wrapper.eval()
      input, target = [
          torch.stack(v)
          for v in zip(*(self.dataset[0], self.dataset[1]))
      ]
      preds = torch.stack(
          [
              self.wrapper.test_on_batch(input, target, cuda=False)
              for _ in range(10)
          ]
      ).view(10, -1)
  
      # Same loss
      assert torch.allclose(torch.mean(preds, 0), preds[0])
  
      preds = torch.stack(
          [
              self.wrapper.test_on_batch(
                  input, target, cuda=False, average_predictions=10
              )
              for _ in range(10)
          ]
      ).view(10, -1)
      assert torch.allclose(torch.mean(preds, 0), preds[0])
  
imports: import math
  import unittest
  from unittest.mock import Mock
  import numpy
  import pytest
  import torch
  import torchmetrics
  from torch import nn
  from torch.utils.data import Dataset, DataLoader
  from baal.modelwrapper import ModelWrapper, mc_inference
  from baal.utils.metrics import ClassificationReport
label_desc: Use image node_id 3 for calling the ModelWrapperMultiOutMultiInTest obj's underlying member method code with example usage: obj.test_test_on_batch() without return types