code: def test_random_rotate():
      rotator = T.RandomRotate(max_angle=10.0, expand=False)
      input_t = tf.ones((50, 50, 3), dtype=tf.float32)
      boxes = np.array([[15, 20, 35, 30]])
      r_img, _r_boxes = rotator(input_t, boxes)
      assert r_img.shape == input_t.shape
  
      rotator = T.RandomRotate(max_angle=10.0, expand=True)
      r_img, _r_boxes = rotator(input_t, boxes)
      assert r_img.shape != input_t.shape
  
      # FP16
      input_t = tf.ones((50, 50, 3), dtype=tf.float16)
      r_img, _ = rotator(input_t, boxes)
      assert r_img.dtype == tf.float16
  
imports: import math
  import numpy
  import pytest
  import tensorflow
  from doctr import transforms
  from doctr.transforms.functional import crop_detection, rotate_sample
label_desc: Use image node_id 14 for calling a global function with example usage: test_random_rotate() without return types