code: def matrix_transpose(x: Array, /) -> Array:
      if x.ndim < 2:
          raise ValueError(
              "x must be at least 2-dimensional for matrix_transpose"
          )
      return Array._new(np.swapaxes(x._array, -1, -2))
  
imports: from __future__ import annotations
  import functools
  from ._dtypes import _floating_dtypes, _numeric_dtypes
  from ._manipulation_functions import reshape
  from ._array_object import Array
  from .._core.internal import _normalize_axis_indices
  from typing import TYPE_CHECKING
  from typing import NamedTuple
  import cupy
label_desc: Use image node_id 12 for calling a global function with example usage: matrix_transpose() and returns: Array