code: def keypoint_rot90(
      keypoint: KeypointInternalType,
      factor: int,
      rows: int,
      cols: int,
      **params,
  ) -> KeypointInternalType:
      """Rotates a keypoint by 90 degrees CCW (see np.rot90)
  
      Args:
          keypoint: A keypoint `(x, y, angle, scale)`.
          factor: Number of CCW rotations. Must be in range [0;3] See np.rot90.
          rows: Image height.
          cols: Image width.
  
      Returns:
          tuple: A keypoint `(x, y, angle, scale)`.
  
      Raises:
          ValueError: if factor not in set {0, 1, 2, 3}
  
      """
      x, y, angle, scale = keypoint[:4]
  
      if factor not in {0, 1, 2, 3}:
          raise ValueError("Parameter n must be in set {0, 1, 2, 3}")
  
      if factor == 1:
          x, y, angle = y, (cols - 1) - x, angle - math.pi / 2
      elif factor == 2:
          x, y, angle = (cols - 1) - x, (rows - 1) - y, angle - math.pi
      elif factor == 3:
          x, y, angle = (rows - 1) - y, x, angle + math.pi / 2
  
      return x, y, angle, scale
  
imports: import math
  from typing import List, Optional, Sequence, Tuple, Union
  import cv2
  import numpy
  import skimage.transform
  from scipy.ndimage import gaussian_filter
  from albumentations.augmentations.utils import _maybe_process_in_chunks, angle_2pi_range, clipped, preserve_channel_dim, preserve_shape
  from ...None import random_utils
  from ...core.bbox_utils import denormalize_bbox, normalize_bbox
  from ...core.transforms_interface import BoxInternalType, FillValueType, ImageColorType, KeypointInternalType
label_desc: Use image node_id 2 for calling a global function with example usage: keypoint_rot90(keypoint, factor, rows, cols) and returns: x,  y,  angle,  scale