code: def _smooth_spm(con, vcon, msk, sigma):
      """
      Given a contrast image `con` and the corresponding variance image
      `vcon`, both assumed to be estimated from non-smoothed first-level
      data, compute what `con` and `vcon` would have been had the data
      been smoothed with a Gaussian kernel.
      """
      scon = _gaussian_filter(con, msk, sigma)
      K = _gaussian_energy(sigma)
      if vcon is not None:
          svcon = K * _gaussian_filter(vcon, msk, sigma / np.sqrt(2))
      else:
          svcon = np.zeros(con.shape)
      return scon, svcon
  
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 5 for calling a global function with example usage: _smooth_spm(con, vcon, msk, sigma) and returns: scon,  svcon