code: def _transpose(a_gpu, conj=False, handle=None):
      if handle is None:
          handle = misc._global_cublas_handle
  
      if len(a_gpu.shape) != 2:
          raise ValueError("a_gpu must be a matrix")
  
      if a_gpu.dtype == np.complex64:
          func = cublas.cublasCgeam
      elif a_gpu.dtype == np.float32:
          func = cublas.cublasSgeam
      elif a_gpu.dtype == np.complex128:
          func = cublas.cublasZgeam
      elif a_gpu.dtype == np.float64:
          func = cublas.cublasDgeam
      else:
          raise ValueError("unsupported input type")
  
      if conj:
          transa = "c"
      else:
          transa = "t"
      M, N = a_gpu.shape
      at_gpu = gpuarray.empty((N, M), a_gpu.dtype)
      func(
          handle,
          transa,
          "t",
          M,
          N,
          1.0,
          a_gpu.gpudata,
          N,
          0.0,
          a_gpu.gpudata,
          N,
          at_gpu.gpudata,
          M,
      )
      return at_gpu
  
imports: from __future__ import absolute_import, division
  from pprint import pprint
  from string import Template
  from pycuda.tools import context_dependent_memoize
  from pycuda.compiler import SourceModule
  from pycuda.reduction import ReductionKernel
  from pycuda import cumath
  import pycuda.gpuarray
  import pycuda.driver
  import pycuda.elementwise
  import pycuda.tools
  import numpy
  from .None import cublas
  from .None import cudart
  from .None import misc
  from .None import cusolver
  import sys
  from .misc import init, shutdown, add_matvec, div_matvec, mult_matvec
  from .None import install_headers
label_desc: Use image node_id 10 for calling a global function with example usage: _transpose(a_gpu, conj, handle) and returns: at_gpu