code: def _save_image(img, path):
      try:
          save_image(img, path)
      except:
          warnings.warn(f"Could not write image: {path}", UserWarning)
  
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 7 for calling a global function with example usage: _save_image(img, path) without return types