code: def test_correct_shape(self, shape, keepdim, im_type):
      arr = im_type(np.random.rand(*shape))
      for dim in range(arr.ndim):
          out = SplitDim(dim, keepdim)(arr)
          self.assertIsInstance(out, (list, tuple))
          self.assertEqual(type(out[0]), type(arr))
          self.assertEqual(len(out), arr.shape[dim])
          expected_ndim = arr.ndim if keepdim else arr.ndim - 1
          self.assertEqual(out[0].ndim, expected_ndim)
          # assert is a shallow copy
          arr[0, 0, 0, 0] *= 2
          self.assertEqual(arr.flatten()[0], out[0].flatten()[0])
  
file_path: MONAI/tests/test_splitdim.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from parameterized import parameterized
  from monai.transforms.utility.array import SplitDim
  from tests.utils import TEST_NDARRAYS
label_desc: Use image node_id 1 for calling the TestSplitDim obj's underlying member method code with example usage: obj.test_correct_shape(shape, keepdim, im_type) without return types