code: def test_rotate():
      transformer = transforms.Rotate(10.0)
      assertRaises(
          TypeError, transformer, mx.np.ones((3, 30, 60), dtype="uint8")
      )
      single_image = mx.np.ones((3, 30, 60), dtype="float32")
      single_output = transformer(single_image)
      assert same(single_output.shape, (3, 30, 60))
      batch_image = mx.np.ones((3, 3, 30, 60), dtype="float32")
      batch_output = transformer(batch_image)
      assert same(batch_output.shape, (3, 3, 30, 60))
  
      input_image = np.array(
          [[[0.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, 0.0, 0.0]]]
      )
      rotation_angles_expected_outs = [
          (
              90.0,
              np.array(
                  [[[0.0, 1.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]]]
              ),
          ),
          (
              180.0,
              np.array(
                  [[[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 0.0]]]
              ),
          ),
          (
              270.0,
              np.array(
                  [[[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0]]]
              ),
          ),
          (
              360.0,
              np.array(
                  [[[0.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, 0.0, 0.0]]]
              ),
          ),
      ]
      for rot_angle, expected_result in rotation_angles_expected_outs:
          transformer = transforms.Rotate(rot_angle)
          ans = transformer(input_image)
          print(type(ans), ans, type(expected_result), expected_result)
          assert_almost_equal(
              ans.asnumpy(), expected_result.asnumpy(), atol=1e-6
          )
  
imports: import os
  from collections import namedtuple
  from uuid import uuid4
  import numpy
  import mxnet
  from mxnet import gluon, autograd, np, npx
  from mxnet.test_utils import use_np, assert_almost_equal, check_gluon_hybridize_consistency, same, check_symbolic_backward
  from common import assertRaises, xfail_when_nonstandard_decimal_separator
  import random
  from mxnet.base import MXNetError
  from mxnet.gluon.data.vision import transforms
  from mxnet import image
  import pytest
label_desc: Use image node_id 11 for calling a global function with example usage: test_rotate() without return types