code: def test_pickle(self):
      # Test that images pickle
      # Image that is not proxied can pickle
      img_klass = self.image_class
      img = img_klass(np.zeros((2, 3, 4)), None)
      img_str = pickle.dumps(img)
      img2 = pickle.loads(img_str)
      assert_array_equal(img.get_fdata(), img2.get_fdata())
      assert img.header == img2.header
      # Save / reload using bytes IO objects
      for key, value in img.file_map.items():
          value.fileobj = BytesIO()
      img.to_file_map()
      img_prox = img.from_file_map(img.file_map)
      img_str = pickle.dumps(img_prox)
      img2_prox = pickle.loads(img_str)
      assert_array_equal(img.get_fdata(), img2_prox.get_fdata())
  
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 9 for calling the TestAnalyzeImage obj's underlying member method code with example usage: obj.test_pickle() without return types