code: def uniform_noise(
      arr: np.array,
      indices: Tuple[
          slice, ...
      ],  # Alt. Union[int, Sequence[int], Tuple[np.array]],
      indexed_axes: Sequence[int],
      lower_bound: float = 0.02,
      upper_bound: Union[None, float] = None,
      **kwargs,
  ) -> np.array:
      """
      Add noise to the input at indices as sampled uniformly random from [-lower_bound, lower_bound].
      if upper_bound is None, and [lower_bound, upper_bound] otherwise.
  
      Parameters
      ----------
      arr: np.ndarray
           Array to be perturbed.
      indices: int, sequence, tuple
          Array-like, with a subset shape of arr.
      indexed_axes: sequence
          The dimensions of arr that are indexed. These need to be consecutive,
                    and either include the first or last dimension of array.
      lower_bound: float
              The lower bound for uniform sampling.
      upper_bound: float, optional
              The upper bound for uniform sampling.
      kwargs: optional
          Keyword arguments.
  
      Returns
      -------
      arr_perturbed: np.ndarray
           The array which some of its indices have been perturbed.
      """
  
      indices = expand_indices(arr, indices, indexed_axes)
  
      if upper_bound is None:
          noise = np.random.uniform(
              low=-lower_bound, high=lower_bound, size=arr.shape
          )
      else:
          assert upper_bound > lower_bound, (
              "Parameter 'upper_bound' needs to be larger than 'lower_bound', "
              "but {} <= {}".format(upper_bound, lower_bound)
          )
          noise = np.random.uniform(
              low=lower_bound, high=upper_bound, size=arr.shape
          )
  
      arr_perturbed = copy.copy(arr)
      arr_perturbed[indices] = (arr_perturbed + noise)[indices]
  
      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 6 for calling a global function with example usage: uniform_noise(arr, indices, indexed_axes, lower_bound, upper_bound) and returns: arr_perturbed