code: def test_offset_to_zero(self):
      # Check offset is always set to zero when creating images
      img_klass = self.image_class
      arr = np.arange(24, dtype=np.int16).reshape((2, 3, 4))
      aff = np.eye(4)
      img = img_klass(arr, aff)
      assert img.header.get_data_offset() == 0
      # Save to BytesIO object(s), make sure offset still zero
      bytes_map = bytesio_filemap(img_klass)
      img.to_file_map(bytes_map)
      assert img.header.get_data_offset() == 0
      # Set offset in in-memory image
      big_off = 1024
      img.header.set_data_offset(big_off)
      assert img.header.get_data_offset() == big_off
      # Offset is in proxy but not in image after saving to fileobj
      img_rt = bytesio_round_trip(img)
      assert img_rt.dataobj.offset == big_off
      assert img_rt.header.get_data_offset() == 0
      # The original header still has the big_off value
      img.header.set_data_offset(big_off)
      # Making a new image with this header resets to zero
      img_again = img_klass(arr, aff, img.header)
      assert img_again.header.get_data_offset() == 0
  
imports: import itertools
  import logging
  import os
  import pickle
  import re
  from io import BytesIO, StringIO
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ..None import imageglobals
  from ..analyze import AnalyzeHeader, AnalyzeImage
  from ..arraywriters import WriterError
  from ..casting import sctypes_aliases
  from ..nifti1 import Nifti1Header
  from ..optpkg import optional_package
  from ..spatialimages import HeaderDataError, HeaderTypeError, supported_np_types
  from ..testing import assert_dt_equal, bytesio_filemap, bytesio_round_trip, data_path, suppress_warnings
  from ..tmpdirs import InTemporaryDirectory
  from .None import test_spatialimages
  from .None import test_wrapstruct
label_desc: Use image node_id 6 for calling the TestAnalyzeImage obj's underlying member method code with example usage: obj.test_offset_to_zero() without return types