code: def test_save1(in_tmp_path):
      # A test to ensure that when a file is saved, the affine and the
      # data agree. This image comes from a NIFTI file
      img = load_image(funcfile)
      save_image(img, TMP_FNAME)
      img2 = load_image(TMP_FNAME)
      assert_array_almost_equal(img.affine, img2.affine)
      assert img.shape == img2.shape
      assert_array_almost_equal(img2.get_fdata(), img.get_fdata())
      del img2
  
file_path: nipy/nipy/io/tests/test_save.py
imports: import numpy
  from nibabel.affines import from_matvec
  from numpy.testing import assert_array_almost_equal
  from nipy.core import api
  from nipy.core.reference.coordinate_map import AffineTransform
  from nipy.core.reference.coordinate_system import CoordinateSystem
  from nipy.core.reference.spaces import mni_csm
  from nipy.io.api import load_image, save_image
  from nipy.testing import funcfile
label_desc: Use image node_id 1 for calling a global function with example usage: test_save1(in_tmp_path) without return types