class_docstr: Random rotate and then crop the largest possible rectangle.
  Note that this will produce images of different shapes.
code: def get_transform(self, img):
      deg = self._get_deg(img)
  
      h, w = img.shape[:2]
      center = (img.shape[1] * 0.5, img.shape[0] * 0.5)
      rot_m = cv2.getRotationMatrix2D(
          (center[0] - 0.5, center[1] - 0.5), deg, 1
      )
      tfm = WarpAffineTransform(rot_m, (w, h), interp=self.interp)
  
      neww, newh = RotationAndCropValid.largest_rotated_rect(w, h, deg)
      neww = min(neww, w)
      newh = min(newh, h)
      newx = int(center[0] - neww * 0.5)
      newy = int(center[1] - newh * 0.5)
      tfm2 = CropTransform(newy, newx, newh, neww)
      return TransformList([tfm, tfm2])
  
imports: import math
  import numpy
  import cv2
  from .base import ImageAugmentor
  from .transform import WarpAffineTransform, CropTransform, TransformList
label_desc: Use image node_id 3 for calling the RotationAndCropValid obj's underlying member method code with example usage: obj.get_transform(img) and returns: TransformList