code: def test_big_offset_exts(self):
      # Check writing offset beyond data works for different file extensions
      img_klass = self.image_class
      arr = np.arange(24, dtype=np.int16).reshape((2, 3, 4))
      aff = np.eye(4)
      img_ext = img_klass.files_types[0][1]
      compressed_exts = ["", ".gz", ".bz2"]
      if HAVE_ZSTD:
          compressed_exts += [".zst"]
      with InTemporaryDirectory():
          for offset in (0, 2048):
              # Set offset in in-memory image
              for compressed_ext in compressed_exts:
                  img = img_klass(arr, aff)
                  img.header.set_data_offset(offset)
                  fname = "test" + img_ext + compressed_ext
                  img.to_filename(fname)
                  img_back = img_klass.from_filename(fname)
                  assert_array_equal(arr, img_back.dataobj)
          del img, img_back
  
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 7 for calling the TestAnalyzeImage obj's underlying member method code with example usage: obj.test_big_offset_exts() without return types