code: def test_is_image():
      # Test is_image check
      arr = np.arange(24).reshape((2, 3, 4))
      cmap = AffineTransform(
          CoordinateSystem("ijk"), CoordinateSystem("xyz"), np.eye(4)
      )
      img = Image(arr, cmap)
      assert is_image(img)
      assert not is_image(object())
  
      class C:
          def get_fdata(self):
              pass
  
      c = C()
      assert not is_image(c)
      c.coordmap = None
      assert not is_image(c)
      c.metadata = None
      assert is_image(c)
  
imports: import warnings
  from itertools import chain
  import nibabel
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from ...api import data_generator, parcels, write_data
  from ...reference.coordinate_map import AffineTransform, AxisError
  from ...reference.coordinate_system import CoordinateSystem
  from ..None import image
  from ..image import Image, is_image, iter_axis, rollimg
label_desc: Use image node_id 21 for calling a global function with example usage: test_is_image() without return types