code: def rotate(image, angle, center=None, scale=1.0):
      # grab the dimensions of the image
      (h, w) = image.shape[:2]
  
      # if the center is None, initialize it as the center of
      # the image
      if center is None:
          center = (w // 2, h // 2)
  
      # perform the rotation
      M = cv2.getRotationMatrix2D(center, angle, scale)
      rotated = cv2.warpAffine(image, M, (w, h))
  
      # return the rotated image
      return rotated
  
file_path: imutils/imutils/convenience.py
imports: import numpy
  import cv2
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: rotate(image, angle, center, scale) and returns: rotated