code: def test_deprecated_order_classvar():
      shape = (15, 16, 17)
      arr = np.arange(np.prod(shape)).reshape(shape)
      fobj = BytesIO()
      fobj.write(arr.tobytes(order="C"))
      sliceobj = (None, slice(None), 1, -1)
  
      # We don't really care about the original order, just that the behavior
      # of the deprecated mode matches the new behavior
      fprox = ArrayProxy(fobj, (shape, arr.dtype), order="F")
      cprox = ArrayProxy(fobj, (shape, arr.dtype), order="C")
  
      # Start raising errors when we crank the dev version
      if Version(__version__) >= Version("7.0.0.dev0"):
          cm = pytest.raises(ExpiredDeprecationError)
      else:
          cm = pytest.deprecated_call()
  
      with cm:
          prox = DeprecatedCArrayProxy(fobj, (shape, arr.dtype))
          assert prox.order == "C"
          assert_array_equal(prox[sliceobj], cprox[sliceobj])
      with cm:
          prox = DeprecatedCArrayProxy(
              fobj, (shape, arr.dtype), order="C"
          )
          assert prox.order == "C"
          assert_array_equal(prox[sliceobj], cprox[sliceobj])
      with cm:
          prox = DeprecatedCArrayProxy(
              fobj, (shape, arr.dtype), order="F"
          )
          assert prox.order == "F"
          assert_array_equal(prox[sliceobj], fprox[sliceobj])
  
imports: import contextlib
  import gzip
  import pickle
  from io import BytesIO
  from unittest import mock
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from packaging.version import Version
  from ..None import __version__
  from ..arrayproxy import ArrayProxy, get_obj_dtype, is_proxy, reshape_dataobj
  from ..deprecator import ExpiredDeprecationError
  from ..nifti1 import Nifti1Header, Nifti1Image
  from ..openers import ImageOpener
  from ..testing import memmap_after_ufunc
  from ..tmpdirs import InTemporaryDirectory
  from .test_fileslice import slicer_samples
  from .test_openers import patch_indexed_gzip
label_desc: Use image node_id 8 for calling a global function with example usage: test_deprecated_order_classvar() without return types