code: def test_copy_order():
      a = np.arange(24).reshape(2, 1, 3, 4)
      b = a.copy(order="F")
      c = np.arange(24).reshape(2, 1, 4, 3).swapaxes(2, 3)
  
      def check_copy_result(x, y, ccontig, fcontig, strides=False):
          assert_(not (x is y))
          assert_equal(x, y)
          assert_equal(res.flags.c_contiguous, ccontig)
          assert_equal(res.flags.f_contiguous, fcontig)
  
      # Validate the initial state of a, b, and c
      assert_(a.flags.c_contiguous)
      assert_(not a.flags.f_contiguous)
      assert_(not b.flags.c_contiguous)
      assert_(b.flags.f_contiguous)
      assert_(not c.flags.c_contiguous)
      assert_(not c.flags.f_contiguous)
  
      # Copy with order='C'
      res = a.copy(order="C")
      check_copy_result(
          res, a, ccontig=True, fcontig=False, strides=True
      )
      res = b.copy(order="C")
      check_copy_result(
          res, b, ccontig=True, fcontig=False, strides=False
      )
      res = c.copy(order="C")
      check_copy_result(
          res, c, ccontig=True, fcontig=False, strides=False
      )
      res = np.copy(a, order="C")
      check_copy_result(
          res, a, ccontig=True, fcontig=False, strides=True
      )
      res = np.copy(b, order="C")
      check_copy_result(
          res, b, ccontig=True, fcontig=False, strides=False
      )
      res = np.copy(c, order="C")
      check_copy_result(
          res, c, ccontig=True, fcontig=False, strides=False
      )
  
      # Copy with order='F'
      res = a.copy(order="F")
      check_copy_result(
          res, a, ccontig=False, fcontig=True, strides=False
      )
      res = b.copy(order="F")
      check_copy_result(
          res, b, ccontig=False, fcontig=True, strides=True
      )
      res = c.copy(order="F")
      check_copy_result(
          res, c, ccontig=False, fcontig=True, strides=False
      )
      res = np.copy(a, order="F")
      check_copy_result(
          res, a, ccontig=False, fcontig=True, strides=False
      )
      res = np.copy(b, order="F")
      check_copy_result(
          res, b, ccontig=False, fcontig=True, strides=True
      )
      res = np.copy(c, order="F")
      check_copy_result(
          res, c, ccontig=False, fcontig=True, strides=False
      )
  
      # Copy with order='K'
      res = a.copy(order="K")
      check_copy_result(
          res, a, ccontig=True, fcontig=False, strides=True
      )
      res = b.copy(order="K")
      check_copy_result(
          res, b, ccontig=False, fcontig=True, strides=True
      )
      res = c.copy(order="K")
      check_copy_result(
          res, c, ccontig=False, fcontig=False, strides=True
      )
      res = np.copy(a, order="K")
      check_copy_result(
          res, a, ccontig=True, fcontig=False, strides=True
      )
      res = np.copy(b, order="K")
      check_copy_result(
          res, b, ccontig=False, fcontig=True, strides=True
      )
      res = np.copy(c, order="K")
      check_copy_result(
          res, c, ccontig=False, fcontig=False, strides=True
      )
  
imports: import sys
  import numpy
  from numpy.core._rational_tests import rational
  import pytest
  from numpy.testing import assert_, assert_equal, assert_array_equal, assert_raises, assert_warns, HAS_REFCOUNT
label_desc: Use image node_id 16 for calling a global function with example usage: test_copy_order() without return types