code: def test_proxy_slicing_with_scaling():
      shape = (15, 16, 17)
      offset = 20
      arr = np.arange(np.prod(shape)).reshape(shape)
      hdr = Nifti1Header()
      hdr.set_data_offset(offset)
      hdr.set_data_dtype(arr.dtype)
      hdr.set_data_shape(shape)
      hdr.set_slope_inter(2.0, 1.0)
      fobj = BytesIO()
      fobj.write(bytes(offset))
      fobj.write(arr.tobytes(order="F"))
      prox = ArrayProxy(fobj, hdr)
      sliceobj = (None, slice(None), 1, -1)
      assert_array_equal(arr[sliceobj] * 2.0 + 1.0, prox[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 6 for calling a global function with example usage: test_proxy_slicing_with_scaling() without return types