class_docstr: Rotate the input image at random angle. The angle will not exceed to max_rotation.
  
  Args:
  
      max_rotation(float): Upper bound of rotation angle.
      im_padding_value(list): Border value for 3 channels, default is [127.5, 127.5, 127.5].
class_docstr_tok: ["Rotate","the","input","image","at","random","angle",".","The","angle","will","not","exceed","to","max_rotation",".","Args",":","max_rotation","(","float",")",":","Upper","bound","of","rotation","angle",".","im_padding_value","(","list",")",":","Border","value","for","3","channels",",","default","is","[","127.5",",","127.5",",","127.5","]","."]
code: def __call__(self, im):
      if self.max_rotation > 0:
          (h, w) = im.shape[:2]
          do_rotation = np.random.uniform(
              -self.max_rotation, self.max_rotation
          )
          pc = (w // 2, h // 2)
          r = cv2.getRotationMatrix2D(pc, do_rotation, 1.0)
          cos = np.abs(r[0, 0])
          sin = np.abs(r[0, 1])
  
          nw = int((h * sin) + (w * cos))
          nh = int((h * cos) + (w * sin))
  
          (cx, cy) = pc
          r[0, 2] += (nw / 2) - cx
          r[1, 2] += (nh / 2) - cy
          dsize = (nw, nh)
          im = cv2.warpAffine(
              im,
              r,
              dsize=dsize,
              flags=cv2.INTER_LINEAR,
              borderMode=cv2.BORDER_CONSTANT,
              borderValue=self.im_padding_value,
          )
  
      return im
  
imports: import random
  from typing import Callable, Union, List, Tuple
  import cv2
  import PIL
  import numpy
  import paddlehub.vision.functional
label_desc: Use image node_id 2 for calling the RandomRotation obj's underlying member method code with example usage: obj.__call__(im) and returns: im