code: def blur_at_indices(
      arr: np.array,
      kernel: np.array,
      indices: Union[
          int, Sequence[int], Tuple[np.array], Tuple[slice, ...]
      ],
      indexed_axes: Sequence[int],
  ) -> np.array:
      """
      Creates a version of arr that is blurred at indices.
  
      Parameters
      ----------
      arr: np.ndarray
           Array to be perturbed.
      kernel: np.ndarray
           Kernel used for blurring.
      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.
  
      Returns
      -------
      np.ndarray
          A version of arr that is blurred at indices.
      """
  
      assert kernel.ndim == len(
          indexed_axes
      ), "kernel should have as many dimensions as indexed_axes has elements."
  
      # Pad array
      pad_width = [(0, 0) for _ in indexed_axes]
      for i, ax in enumerate(indexed_axes):
          pad_left = kernel.shape[i] // 2
          pad_right = kernel.shape[i] // 2 - (kernel.shape[i] % 2 == 0)
          pad_width[i] = (pad_left, pad_right)
      x = _pad_array(
          arr, pad_width, mode="constant", padded_axes=indexed_axes
      )
  
      # Handle indices
      indices = expand_indices(arr, indices, indexed_axes)
      none_slices = []
      array_indices: Union[list, np.ndarray] = []
      for i, idx in enumerate(indices):
          if isinstance(idx, slice) and idx == slice(None):
              none_slices.append(idx)
          elif isinstance(idx, np.ndarray):
              pad_left = (
                  kernel.shape[[p for p in indexed_axes].index(i)] // 2
              )
              array_indices.append(idx + pad_left)
          else:
              raise ValueError("Invalid indices {}".format(indices))
      array_indices = np.array(array_indices)
  
      # Expand kernel dimensions
      expanded_kernel = np.expand_dims(
          kernel,
          tuple([i for i in range(arr.ndim) if i not in indexed_axes]),
      )
  
      # Iterate over indices, applying expanded kernel
      x_blur = copy.copy(x)
      arr_indices_flattened = np.array(
          [a.flatten() for a in array_indices]
      )
      for i in range(arr_indices_flattened.shape[-1]):
          idx = list(arr_indices_flattened[..., [i]])
          expanded_idx = copy.copy(idx)
  
          for ax, idx_ax in enumerate(expanded_idx):
              s = kernel.shape[ax]
              idx_ax = np.squeeze(idx_ax)
              expanded_idx[ax] = slice(
                  idx_ax - (s // 2), idx_ax + s // 2 + 1 - (s % 2 == 0)
              )
  
          for dim in range(array_indices.ndim - 2):
              idx = [
                  np.expand_dims(index, axis=index.ndim)
                  for index in idx
              ]
  
          if 0 not in indexed_axes:
              expanded_idx = none_slices + expanded_idx
              idx = none_slices + idx
  
          expanded_idx = tuple(expanded_idx)
          idx = tuple(idx)
  
          x_blur[idx] = np.sum(
              np.multiply(
                  np.array(x)[expanded_idx], np.array(expanded_kernel)
              ),
              axis=tuple(indexed_axes),
              keepdims=True,
          )
  
      return _unpad_array(x_blur, pad_width, padded_axes=indexed_axes)
  
imports: import copy
  import re
  from importlib import util
  from typing import Any, Dict, Optional, Sequence, Tuple, Union, List, TypeVar
  import numpy
  from skimage.segmentation import slic, felzenszwalb
  from quantus.helpers import asserts
  from quantus.helpers.model.model_interface import ModelInterface
label_desc: Use image node_id 11 for calling a global function with example usage: blur_at_indices(arr, kernel, indices, indexed_axes) and returns: _unpad_array