code: def bbox_shift_scale_rotate(
      bbox, angle, scale, dx, dy, rotate_method, rows, cols, **kwargs
  ):  # skipcq: PYL-W0613
      """Rotates, shifts and scales a bounding box. Rotation is made by angle degrees,
      scaling is made by scale factor and shifting is made by dx and dy.
  
  
      Args:
          bbox (tuple): A bounding box `(x_min, y_min, x_max, y_max)`.
          angle (int): Angle of rotation in degrees.
          scale (int): Scale factor.
          dx (int): Shift along x-axis in pixel units.
          dy (int): Shift along y-axis in pixel units.
          rotate_method(str): Rotation method used. Should be one of: "largest_box", "ellipse".
              Default: "largest_box".
          rows (int): Image rows.
          cols (int): Image cols.
  
      Returns:
          A bounding box `(x_min, y_min, x_max, y_max)`.
  
      """
      height, width = rows, cols
      center = (width / 2, height / 2)
      if rotate_method == "ellipse":
          x_min, y_min, x_max, y_max = bbox_rotate(
              bbox, angle, rotate_method, rows, cols
          )
          matrix = cv2.getRotationMatrix2D(center, 0, scale)
      else:
          x_min, y_min, x_max, y_max = bbox[:4]
          matrix = cv2.getRotationMatrix2D(center, angle, scale)
      matrix[0, 2] += dx * width
      matrix[1, 2] += dy * height
      x = np.array([x_min, x_max, x_max, x_min])
      y = np.array([y_min, y_min, y_max, y_max])
      ones = np.ones(shape=(len(x)))
      points_ones = np.vstack([x, y, ones]).transpose()
      points_ones[:, 0] *= width
      points_ones[:, 1] *= height
      tr_points = matrix.dot(points_ones.T).T
      tr_points[:, 0] /= width
      tr_points[:, 1] /= height
  
      x_min, x_max = min(tr_points[:, 0]), max(tr_points[:, 0])
      y_min, y_max = min(tr_points[:, 1]), max(tr_points[:, 1])
  
      return x_min, y_min, x_max, y_max
  
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 8 for calling a global function with example usage: bbox_shift_scale_rotate(bbox, angle, scale, dx, dy, rotate_method, rows, cols) and returns: x_min,  y_min,  x_max,  y_max