code: def baseline_replacement_by_blur(
      arr: np.array,
      indices: Tuple[np.array],
      indexed_axes: Sequence[int],
      blur_kernel_size: Union[int, Sequence[int]] = 15,
      **kwargs,
  ) -> np.array:
      """
      Replace array at indices by a blurred version, performed via convolution.
  
      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.
      blur_kernel_size: int, sequence
              Controls the kernel-size of that convolution (Default is 15).
      kwargs: optional
          Keyword arguments.
  
      Returns
      -------
      arr_perturbed: np.ndarray
           The array which some of its indices have been perturbed.
      """
  
      exp_indices = expand_indices(arr, indices, indexed_axes)
  
      # Expand blur_kernel_size.
      if isinstance(blur_kernel_size, int):
          blur_kernel_size = [blur_kernel_size for _ in indexed_axes]
  
      assert len(blur_kernel_size) == len(indexed_axes)
  
      # Create a kernel and expand dimensions to arr.ndim.
      kernel = np.ones(blur_kernel_size, dtype=arr.dtype)
      kernel *= 1.0 / np.prod(blur_kernel_size)
  
      # Blur the array at indicies 8since otherwise n-d convolution can be quite computationally expensive),
      # else it is equal to arr.
      arr_perturbed = blur_at_indices(
          arr, kernel, exp_indices, indexed_axes
      )
  
      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 4 for calling a global function with example usage: baseline_replacement_by_blur(arr, indices, indexed_axes, blur_kernel_size) and returns: arr_perturbed