code: def from_pycuda(pycuda_arr, device=0):
      """Read in gpuarray from PyCUDA and output CuPy array
  
      Parameters
      ----------
      pycuda_arr : PyCUDA gpuarray
      device : int
          GPU Device ID
  
      Returns
      -------
      cupy_arr : CuPy ndarray
  
      """
  
      cupy_arr = cp.ndarray(
          pycuda_arr.shape,
          cp.dtype(pycuda_arr.dtype),
          cp.cuda.MemoryPointer(
              cp.cuda.UnownedMemory(
                  pycuda_arr.ptr, pycuda_arr.size, pycuda_arr, device
              ),
              0,
          ),
          strides=pycuda_arr.strides,
      )
  
      return cupy_arr
  
file_path: cusignal/python/cusignal/utils/arraytools.py
imports: import cupy
  import numpy
  from numba import cuda
label_desc: Use image node_id 5 for calling a global function with example usage: from_pycuda(pycuda_arr, device) and returns: cupy_arr