code: def _test_size_and_type_for_generator(self, pred_y, expected_size):
      if isinstance(pred_y, (list, tuple)):
          for o in pred_y:
              self._test_size_and_type_for_generator(o, expected_size)
      elif isinstance(pred_y, dict):
          for val in pred_y.values():
              self._test_size_and_type_for_generator(val, expected_size)
      else:
          self.assertEqual(type(pred_y), np.ndarray)
          self.assertEqual(pred_y.shape, expected_size)
  
imports: import os
  from unittest.mock import ANY, MagicMock, call
  import numpy
  import torch
  import torch.nn
  from poutyne import Callback
  from tests.framework.base import CaptureOutputBase
label_desc: Use image node_id 7 for calling the ModelFittingTestCase obj's underlying member method code with example usage: obj._test_size_and_type_for_generator(pred_y, expected_size) without return types