docstr: Smooth input contrast images to account for localization
  uncertainty in reference space.
docstr_tok: ["Smooth","input","contrast","images","to","account","for","localization","uncertainty","in","reference","space","."]
code: def _smooth_images(self, write):
      """
      Smooth input contrast images to account for localization
      uncertainty in reference space.
      """
      cons, vcons = [], []
      for i in range(self.n_subjects):
          con = self.con_imgs[i]
          if self.vcon_imgs is not None:
              vcon = self.vcon_imgs[i]
          else:
              vcon = None
          scon, svcon = _smooth_image_pair(
              con, vcon, self.sigma, method=self.smooth_method
          )
          if write and self.res_path is not None:
              _save_image(
                  scon, join(self.res_path, "scon" + str(i) + ".nii.gz")
              )
              _save_image(
                  svcon,
                  join(self.res_path, "svcon" + str(i) + ".nii.gz"),
              )
          cons += [scon.get_fdata()[self.msk]]
          vcons += [svcon.get_fdata()[self.msk]]
  
      self.cons = np.array(cons)
      self.vcons = np.array(vcons)
  
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 2 for calling the ParcelAnalysis obj's underlying member method code with example usage: obj._smooth_images(write) without return types