code: def test_rotate2d3():
      # Another way to rotate/transpose the image, similar to
      # test_rotate2d2 and test_rotate2d, except the world of the
      # output coordmap is the same as the world of the
      # original image. That is, the data is transposed on disk, but the
      # output coordinates are still 'x,'y' order, not 'y', 'x' order as
      # above
  
      # this functionality may or may not be used a lot. if data is to
      # be transposed but one wanted to keep the NIFTI order of output
      # coords this would do the trick
      g = AffineTransform.from_params(
          "xy", "ij", np.diag([0.5, 0.7, 1])
      )
      i = Image(np.ones((100, 80)), g)
      # This sets the image data by writing into the array
      i.get_fdata()[50:55, 40:55] = 3.0
      a = np.identity(3)
      g2 = AffineTransform.from_params(
          "xy", "ij", np.array([[0, 0.5, 0], [0.7, 0, 0], [0, 0, 1]])
      )
      ir = resample(i, g2, a, (80, 100))
      assert_array_almost_equal(ir.get_fdata().T, i.get_fdata())
  
imports: from itertools import product
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from nipy.algorithms.resample import resample, resample_img2img
  from nipy.core.api import AffineTransform, ArrayCoordMap, Image, vox2mni
  from nipy.core.reference import slices
  from nipy.io.api import load_image
  from nipy.testing import anatfile, funcfile
label_desc: Use image node_id 4 for calling a global function with example usage: test_rotate2d3() without return types