code: def test_fft_with_order(dtype, order, fft):
      # Check that FFT/IFFT produces identical results for C, Fortran and
      # non contiguous arrays
      rng = np.random.RandomState(42)
      X = rng.rand(8, 7, 13).astype(dtype, copy=False)
      if order == "F":
          Y = np.asfortranarray(X)
      else:
          # Make a non contiguous array
          Y = X[::-1]
          X = np.ascontiguousarray(X[::-1])
  
      if fft.__name__.endswith("fft"):
          for axis in range(3):
              X_res = fft(X, axis=axis)
              Y_res = fft(Y, axis=axis)
              assert_array_almost_equal(X_res, Y_res)
      elif fft.__name__.endswith(("fft2", "fftn")):
          axes = [(0, 1), (1, 2), (0, 2)]
          if fft.__name__.endswith("fftn"):
              axes.extend([(0,), (1,), (2,), None])
          for ax in axes:
              X_res = fft(X, axes=ax)
              Y_res = fft(Y, axes=ax)
              assert_array_almost_equal(X_res, Y_res)
      else:
          raise ValueError
  
imports: import queue
  import threading
  import multiprocessing
  import numpy
  import pytest
  from numpy.random import random
  from numpy.testing import assert_array_almost_equal, assert_allclose
  from pytest import raises
  import scipy.fft
  from scipy.conftest import array_api_compatible, skip_if_array_api_backend
  from scipy._lib._array_api import array_namespace, size, xp_assert_close, xp_assert_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_fft_with_order(dtype, order, fft) without return types