code: def test_interp_obj():
      arr = np.arange(24).reshape((2, 3, 4))
      coordmap = vox2mni(np.eye(4))
      img = Image(arr, coordmap)
      interp = ImageInterpolator(img)
      assert interp.mode == "constant"
      assert interp.order == 3
      # order is read-only
      pytest.raises(AttributeError, setattr, interp, "order", 1)
      interp = ImageInterpolator(img, mode="nearest")
      assert interp.mode == "nearest"
      # mode is read-only
      pytest.raises(AttributeError, setattr, interp, "mode", "reflect")
  
file_path: nipy/nipy/algorithms/tests/test_interpolator.py
imports: from itertools import product
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  from scipy.ndimage import map_coordinates
  from nipy.core.api import Image, vox2mni
  from ..interpolation import ImageInterpolator
label_desc: Use image node_id 1 for calling a global function with example usage: test_interp_obj() without return types