code: def bbox_rot90(
      bbox: BoxInternalType, factor: int, rows: int, cols: int
  ) -> BoxInternalType:  # skipcq: PYL-W0613
      """Rotates a bounding box by 90 degrees CCW (see np.rot90)
  
      Args:
          bbox: A bounding box tuple (x_min, y_min, x_max, y_max).
          factor: Number of CCW rotations. Must be in set {0, 1, 2, 3} See np.rot90.
          rows: Image rows.
          cols: Image cols.
  
      Returns:
          tuple: A bounding box tuple (x_min, y_min, x_max, y_max).
  
      """
      if factor not in {0, 1, 2, 3}:
          raise ValueError("Parameter n must be in set {0, 1, 2, 3}")
      x_min, y_min, x_max, y_max = bbox[:4]
      if factor == 1:
          bbox = y_min, 1 - x_max, y_max, 1 - x_min
      elif factor == 2:
          bbox = 1 - x_max, 1 - y_max, 1 - x_min, 1 - y_min
      elif factor == 3:
          bbox = 1 - y_max, x_min, 1 - y_min, x_max
      return bbox
  
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 1 for calling a global function with example usage: bbox_rot90(bbox, factor, rows, cols) and returns: bbox