code: def test_create_rotate(self):
      with self.assertRaisesRegex(TypeError, ""):
          create_rotate(2, None)
  
      with self.assertRaisesRegex(ValueError, ""):
          create_rotate(5, 1)
  
      test_assert(
          create_rotate,
          (2, 1.1),
          np.array(
              [
                  [0.45359612, -0.89120736, 0.0],
                  [0.89120736, 0.45359612, 0.0],
                  [0.0, 0.0, 1.0],
              ]
          ),
      )
      test_assert(
          create_rotate,
          (3, 1.1),
          np.array(
              [
                  [1.0, 0.0, 0.0, 0.0],
                  [0.0, 0.45359612, -0.89120736, 0.0],
                  [0.0, 0.89120736, 0.45359612, 0.0],
                  [0.0, 0.0, 0.0, 1.0],
              ]
          ),
      )
      test_assert(
          create_rotate,
          (3, (1.1, 1)),
          np.array(
              [
                  [0.54030231, 0.0, 0.84147098, 0.0],
                  [0.74992513, 0.45359612, -0.48152139, 0.0],
                  [-0.38168798, 0.89120736, 0.24507903, 0.0],
                  [0.0, 0.0, 0.0, 1.0],
              ]
          ),
      )
      test_assert(
          create_rotate,
          (3, (1, 1, 1.1)),
          np.array(
              [
                  [0.24507903, -0.48152139, 0.84147098, 0.0],
                  [0.80270075, -0.38596121, -0.45464871, 0.0],
                  [0.54369824, 0.78687425, 0.29192658, 0.0],
                  [0.0, 0.0, 0.0, 1.0],
              ]
          ),
      )
      test_assert(
          create_rotate,
          (3, (0, 0, np.pi / 2)),
          np.array(
              [
                  [0.0, -1.0, 0.0, 0.0],
                  [1.0, 0.0, 0.0, 0.0],
                  [0.0, 0.0, 1.0, 0.0],
                  [0.0, 0.0, 0.0, 1.0],
              ]
          ),
      )
  
file_path: MONAI/tests/test_create_grid_and_affine.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from monai.transforms import create_control_grid, create_grid, create_rotate, create_scale, create_shear, create_translate
  from tests.utils import assert_allclose, is_tf32_env
label_desc: Use image node_id 1 for calling the TestCreateAffine obj's underlying member method code with example usage: obj.test_create_rotate() without return types