code: def _gaussian_filter(x, msk, sigma):
      """
      Smooth a multidimensional array `x` using a Gaussian filter with
      axis-wise standard deviations given by `sigma`, after padding `x`
      with zeros within a mask `msk`.
      """
      x[msk] = 0.0
      gx = nd.gaussian_filter(x, sigma)
      norma = 1 - nd.gaussian_filter(msk.astype(float), sigma)
      gx[~msk] /= norma[~msk]
      gx[msk] = 0.0
      return gx
  
imports: import warnings
  from os.path import join
  import numpy
  import scipy.ndimage
  import scipy.stats
  from nibabel import io_orientation
  from ...None import save_image
  from ...core.image.image_spaces import make_xyz_image, xyz_affine
  from ..kernel_smooth import fwhm2sigma
  from ..registration import resample
  from ..statistics.bayesian_mixed_effects import two_level_glm
  from ..statistics.histogram import histogram
label_desc: Use image node_id 1 for calling a global function with example usage: _gaussian_filter(x, msk, sigma) and returns: gx