code: def shift_scale_rotate(
      img,
      angle,
      scale,
      dx,
      dy,
      interpolation=cv2.INTER_LINEAR,
      border_mode=cv2.BORDER_REFLECT_101,
      value=None,
  ):
      height, width = img.shape[:2]
      # for images we use additional shifts of (0.5, 0.5) as otherwise
      # we get an ugly black border for 90deg rotations
      center = (width / 2 - 0.5, height / 2 - 0.5)
      matrix = cv2.getRotationMatrix2D(center, angle, scale)
      matrix[0, 2] += dx * width
      matrix[1, 2] += dy * height
  
      warp_affine_fn = _maybe_process_in_chunks(
          cv2.warpAffine,
          M=matrix,
          dsize=(width, height),
          flags=interpolation,
          borderMode=border_mode,
          borderValue=value,
      )
      return warp_affine_fn(img)
  
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 6 for calling a global function with example usage: shift_scale_rotate(img, angle, scale, dx, dy, interpolation, border_mode, value) and returns: warp_affine_fn