code: def test_matrix_transpose_equals_swapaxes(shape):
      num_of_axes = len(shape)
      vec = np.arange(shape[-1])
      arr = np.broadcast_to(vec, shape)
      tgt = np.swapaxes(arr, num_of_axes - 2, num_of_axes - 1)
      mT = arr.mT
      assert_array_equal(tgt, mT)
  
imports: import pytest
  import numpy
  from numpy.testing import assert_array_equal
label_desc: Use image node_id 3 for calling a global function with example usage: test_matrix_transpose_equals_swapaxes(shape) without return types