class_docstr: Randomly rotate a tensor image and its boxes
  
  .. image:: https://doctr-static.mindee.com/models?id=v0.4.0/rotation_illustration.png&src=0
      :align: center
  
  Args:
  ----
      max_angle: maximum angle for rotation, in degrees. Angles will be uniformly picked in
          [-max_angle, max_angle]
      expand: whether the image should be padded before the rotation
code: def __call__(
      self, img: Any, target: np.ndarray
  ) -> Tuple[Any, np.ndarray]:
      angle = random.uniform(-self.max_angle, self.max_angle)
      r_img, r_polys = F.rotate_sample(img, target, angle, self.expand)
      # Removes deleted boxes
      is_kept = (r_polys.max(1) > r_polys.min(1)).sum(1) == 2
      return r_img, r_polys[is_kept]
  
imports: import math
  import random
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  from doctr.utils.repr import NestedObject
  from ..None import functional
label_desc: Use image node_id 3 for calling the RandomRotate obj's underlying member method code with example usage: obj.__call__(img, target) and returns: r_img,  r_polys