code: def rotation(
      arr: np.array, perturb_angle: float = 10, **kwargs
  ) -> np.array:
      """
       Rotate array by some given angle, assumes image type data and channel first layout.
  
       Parameters
       ----------
       arr: np.ndarray
           Array to be perturbed.
       perturb_angle: float
          The angle to perturb.
       kwargs: optional
          Keyword arguments.
  
      Returns
       -------
       arr_perturbed: np.ndarray
           The array which some of its indices have been perturbed.
      """
  
      if arr.ndim != 3:
          raise ValueError(
              "perturb func 'rotation' requires image-type data."
              "Check that this perturb_func receives a 3D array."
          )
  
      matrix = cv2.getRotationMatrix2D(
          center=(arr.shape[1] / 2, arr.shape[2] / 2),
          angle=perturb_angle,
          scale=1,
      )
      arr_perturbed = cv2.warpAffine(
          np.moveaxis(arr, 0, 2),
          matrix,
          (arr.shape[1], arr.shape[2]),
      )
      arr_perturbed = np.moveaxis(arr_perturbed, 2, 0)
      return arr_perturbed
  
file_path: Quantus/quantus/functions/perturb_func.py
imports: import copy
  import random
  import warnings
  from typing import Any, Callable, Sequence, Tuple, Union, Optional
  import cv2
  import numpy
  from scipy.sparse import lil_matrix, csc_matrix
  from scipy.sparse.linalg import spsolve
  from quantus.helpers.utils import get_baseline_value, blur_at_indices, expand_indices, get_leftover_shape, offset_coordinates
label_desc: Use image node_id 7 for calling a global function with example usage: rotation(arr, perturb_angle) and returns: arr_perturbed