code: def test_random_rotation():
      # test exceptions for probability input outside of [0,1]
      assertRaises(
          ValueError,
          transforms.RandomRotation,
          [-10, 10.0],
          rotate_with_proba=1.1,
      )
      assertRaises(
          ValueError,
          transforms.RandomRotation,
          [-10, 10.0],
          rotate_with_proba=-0.3,
      )
      # test `forward`
      transformer = transforms.RandomRotation([-10, 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))
      # test identity (rotate_with_proba = 0)
      transformer = transforms.RandomRotation(
          [-100.0, 100.0], rotate_with_proba=0.0
      )
      data = mx.np.random.normal(size=(3, 30, 60))
      assert_almost_equal(data.asnumpy(), transformer(data).asnumpy())
  
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 12 for calling a global function with example usage: test_random_rotation() without return types