code: def test_reorder_img_non_native_endianness():
      def _get_resampled_img(dtype):
          data = np.ones((10, 10, 10), dtype=dtype)
          data[3:7, 3:7, 3:7] = 2
  
          theta = math.pi / 6.0
          c = math.cos(theta)
          s = math.sin(theta)
  
          affine = np.array(
              [[1, 0, 0, 0], [0, c, -s, 0], [0, s, c, 0], [0, 0, 0, 1]]
          )
  
          img = Nifti1Image(data, affine)
          return resample_img(img, target_affine=affine)
  
      img_1 = _get_resampled_img("<f8")
      img_2 = _get_resampled_img(">f8")
  
      assert_equal(get_data(img_1), get_data(img_2))
  
imports: import copy
  import math
  import os
  from pathlib import Path
  import numpy
  import pytest
  from nibabel import Nifti1Header, Nifti1Image
  from nibabel.freesurfer import MGHImage
  from numpy.testing import assert_allclose, assert_almost_equal, assert_array_almost_equal, assert_array_equal, assert_equal
  from nilearn import _utils
  from nilearn._utils import testing
  from nilearn.conftest import _affine_eye, _rng
  from nilearn.image import get_data
  from nilearn.image.image import _pad_array, crop_img
  from nilearn.image.resampling import BoundingBoxError, coord_transform, from_matrix_vector, get_bounds, reorder_img, resample_img, resample_to_img
label_desc: Use image node_id 31 for calling a global function with example usage: test_reorder_img_non_native_endianness() and returns: resample_img