code: def test_header():
      # Property header interface deprecated
      arr = np.arange(24).reshape((2, 3, 4))
      coordmap = AffineTransform.from_params("xyz", "ijk", np.eye(4))
      header = nib.Nifti1Header()
      img = Image(arr, coordmap, metadata={"header": header})
      assert img.metadata["header"] == header
      # This interface deprecated
      with pytest.deprecated_call():
          assert img.header == header
      hdr2 = nib.Nifti1Header()
      hdr2["descrip"] = "from fullness of heart"
      assert img.metadata["header"] != hdr2
      img.metadata["header"] = hdr2
      assert img.metadata["header"] == hdr2
  
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 16 for calling a global function with example usage: test_header() without return types