code: def _fast_smooth_array(arr):
      """Perform simple smoothing.
  
      Less computationally expensive than applying a Gaussian filter.
  
      Only the first three dimensions of the array will be smoothed. The
      filter uses [0.2, 1, 0.2] weights in each direction and use a
      normalisation to preserve the local average value.
  
      Parameters
      ----------
      arr : :class:`numpy.ndarray`
          4D array, with image number as last dimension. 3D arrays are
          also accepted.
  
      Returns
      -------
      :class:`numpy.ndarray`
          Smoothed array.
  
      Notes
      -----
      Rather than calling this function directly, users are encouraged
      to call the high-level function :func:`smooth_img` with
      `fwhm='fast'`.
  
      """
      neighbor_weight = 0.2
      # 6 neighbors in 3D if not on an edge
      nb_neighbors = 6
      # This scale ensures that a uniform array stays uniform
      # except on the array edges
      scale = 1 + nb_neighbors * neighbor_weight
  
      # Need to copy because the smoothing is done in multiple statements
      # and there does not seem to be an easy way to do it in place
      smoothed_arr = arr.copy()
      weighted_arr = neighbor_weight * arr
  
      smoothed_arr[:-1] += weighted_arr[1:]
      smoothed_arr[1:] += weighted_arr[:-1]
      smoothed_arr[:, :-1] += weighted_arr[:, 1:]
      smoothed_arr[:, 1:] += weighted_arr[:, :-1]
      smoothed_arr[:, :, :-1] += weighted_arr[:, :, 1:]
      smoothed_arr[:, :, 1:] += weighted_arr[:, :, :-1]
      smoothed_arr /= scale
  
      return smoothed_arr
  
imports: import collections.abc
  import copy
  import itertools
  import warnings
  import nibabel
  import numpy
  from joblib import Memory, Parallel, delayed
  from scipy.ndimage import gaussian_filter1d, generate_binary_structure, label
  from scipy.stats import scoreatpercentile
  from ..None import signal
  from .._utils import _repr_niimgs, as_ndarray, check_niimg, check_niimg_3d, check_niimg_4d, fill_doc
  from .._utils.exceptions import DimensionError
  from .._utils.helpers import rename_parameters, stringify_path
  from .._utils.niimg import _get_data, safe_get_data
  from .._utils.niimg_conversions import _index_img, check_same_fov, iter_check_niimg
  from .._utils.param_validation import check_threshold
  from .._utils.path_finding import resolve_globbing
label_desc: Use image node_id 3 for calling a global function with example usage: _fast_smooth_array(arr) and returns: smoothed_arr