code: def test_correct_shapes(
      self,
      im_type,
      x,
      y,
      z,
      keep_size,
      mode,
      padding_mode,
      align_corners,
      expected,
  ):
      init_param = {
          "keys": ("img", "seg"),
          "range_x": x,
          "range_y": y,
          "range_z": z,
          "prob": 1.0,
          "keep_size": keep_size,
          "mode": mode,
          "padding_mode": padding_mode,
          "align_corners": align_corners,
          "dtype": np.float64,
      }
      rotate_fn = RandRotated(**init_param)
      rotate_fn.set_random_state(243)
      call_param = {
          "data": {
              "img": im_type(self.imt[0]),
              "seg": im_type(self.segn[0]),
          }
      }
      rotated = rotate_fn(**call_param)
  
      # test lazy
      test_resampler_lazy(
          rotate_fn,
          rotated,
          init_param=init_param,
          call_param=call_param,
          seed=243,
          output_key="img",
      )
      np.testing.assert_allclose(rotated["img"].shape, expected)
  
      rotate_fn.prob = 0.0
      rotated = rotate_fn(
          {"img": im_type(self.imt[0]), "seg": im_type(self.segn[0])}
      )
      self.assertEqual(rotated["seg"].dtype, torch.float32)
  
file_path: MONAI/tests/test_rand_rotated.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import scipy.ndimage
  import torch
  from parameterized import parameterized
  from monai.config import USE_COMPILED
  from monai.transforms import RandRotated
  from monai.utils import GridSampleMode, GridSamplePadMode
  from tests.lazy_transforms_utils import test_resampler_lazy
  from tests.utils import TEST_NDARRAYS_ALL, NumpyImageTestCase2D, NumpyImageTestCase3D, test_local_inversion
label_desc: Use image node_id 1 for calling the TestRandRotated3D obj's underlying member method code with example usage: obj.test_correct_shapes(im_type, x, y, z, keep_size, mode, padding_mode, align_corners, expected) without return types