code: def _smooth_image_pair(con_img, vcon_img, sigma, method="default"):
      """
      Smooth an input image and associated variance image using either
      the spatial uncertainty accounting method consistent with Keller
      et al's model, or the SPM approach.
      """
      if method == "default":
          smooth_fn = _smooth
      elif method == "spm":
          smooth_fn = _smooth_spm
      else:
          raise ValueError("Unknown smoothing method")
      con = con_img.get_fdata()
      if vcon_img is not None:
          vcon = con_img.get_fdata()
      else:
          vcon = None
      msk = np.isnan(con)
      scon, svcon = smooth_fn(con, vcon, msk, sigma)
      scon_img = make_xyz_image(
          scon, xyz_affine(con_img), con_img.reference
      )
      svcon_img = make_xyz_image(
          svcon, xyz_affine(con_img), con_img.reference
      )
      return scon_img, svcon_img
  
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 6 for calling a global function with example usage: _smooth_image_pair(con_img, vcon_img, sigma, method) and returns: scon_img,  svcon_img