code: def test_rotate_equal(img, aug_cls, angle):
      random.seed(0)
  
      h, w = img.shape[:2]
      kp = [
          [
              random.randint(0, w - 1),
              random.randint(0, h - 1),
              random.randint(0, 360),
          ]
          for _ in range(50)
      ]
      kp += [
          [round(w * 0.2), int(h * 0.3), 90],
          [int(w * 0.2), int(h * 0.3), 90],
          [int(w * 0.2), int(h * 0.3), 90],
          [int(w * 0.2), int(h * 0.3), 90],
          [0, 0, 0],
          [w - 1, h - 1, 0],
      ]
      keypoint_params = A.KeypointParams("xya", remove_invisible=False)
  
      a = A.Compose(
          [aug_cls(rotate=(angle, angle))],
          keypoint_params=keypoint_params,
      )
      b = A.Compose(
          [
              A.Rotate(
                  (angle, angle),
                  border_mode=cv2.BORDER_CONSTANT,
                  value=0,
                  p=1,
              )
          ],
          keypoint_params=keypoint_params,
      )
  
      res_a = a(image=img, keypoints=kp)
      res_b = b(image=img, keypoints=kp)
      assert np.allclose(res_a["image"], res_b["image"])
      res_a = np.array(res_a["keypoints"])
      res_b = np.array(res_b["keypoints"])
      diff = np.round(np.abs(res_a - res_b))
      assert diff[:, :2].max() <= 2
      assert (diff[:, -1] % 360).max() <= 1
  
imports: import random
  from functools import partial
  import cv2
  import numpy
  import pytest
  import albumentations
  import albumentations.augmentations.functional
  import albumentations.augmentations.geometric.functional
  from albumentations.augmentations.blur.functional import gaussian_blur
  from .utils import get_dual_transforms, get_image_only_transforms, get_transforms
label_desc: Use image node_id 50 for calling a global function with example usage: test_rotate_equal(img, aug_cls, angle) without return types