code: def test_none_affine(self):
      # Allow for possibility of no affine resulting in nothing written into
      # mat file.  If the mat file is a filename, we just get no file, but if
      # it's a fileobj, we get an empty fileobj
      img_klass = self.image_class
      # With a None affine - no matfile written
      img = img_klass(np.zeros((2, 3, 4)), None)
      aff = img.header.get_best_affine()
      # Save / reload using bytes IO objects
      for key, value in img.file_map.items():
          value.fileobj = BytesIO()
      img.to_file_map()
      img_back = img.from_file_map(img.file_map)
      assert_array_equal(img_back.affine, aff)
  
imports: import itertools
  import unittest
  from io import BytesIO
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ..optpkg import optional_package
  from ..casting import sctypes_aliases, shared_range, type_info
  from ..spatialimages import HeaderDataError
  from ..spm99analyze import HeaderTypeError, Spm99AnalyzeHeader, Spm99AnalyzeImage
  from ..testing import assert_allclose_safely, bytesio_filemap, bytesio_round_trip, suppress_warnings
  from ..volumeutils import _dt_min_max, apply_read_scaling
  from .None import test_analyze
label_desc: Use image node_id 2 for calling the TestSpm99AnalyzeImage obj's underlying member method code with example usage: obj.test_none_affine() without return types