code: def test_random_rotate():
      rotator = RandomRotate(max_angle=10.0, expand=False)
      input_t = torch.ones((3, 50, 50), dtype=torch.float32)
      boxes = np.array([[15, 20, 35, 30]])
      r_img, _r_boxes = rotator(input_t, boxes)
      assert r_img.shape == input_t.shape
  
      rotator = RandomRotate(max_angle=10.0, expand=True)
      r_img, _r_boxes = rotator(input_t, boxes)
      assert r_img.shape != input_t.shape
  
      # FP16 (only on GPU)
      if torch.cuda.is_available():
          input_t = torch.ones((3, 50, 50), dtype=torch.float16).cuda()
          r_img, _ = rotator(input_t, boxes)
          assert r_img.dtype == torch.float16
  
file_path: doctr/tests/pytorch/test_transforms_pt.py
imports: import math
  import numpy
  import pytest
  import torch
  from doctr.transforms import ChannelShuffle, ColorInversion, GaussianNoise, RandomCrop, RandomHorizontalFlip, RandomRotate, RandomShadow, Resize
  from doctr.transforms.functional import crop_detection, rotate_sample
label_desc: Use image node_id 4 for calling a global function with example usage: test_random_rotate() without return types