code: def test_cuda_array_interface_tensor_gpu():
      arr = np.random.rand(3, 5, 6)
      pipe = ExternalSourcePipe(arr.shape[0], arr)
      pipe.build()
      tensor_list = pipe.run()[0]
      assert (
          tensor_list[0].__cuda_array_interface__["data"][0]
          == tensor_list[0].data_ptr()
      )
      assert not tensor_list[0].__cuda_array_interface__["data"][1]
      assert np.array_equal(
          tensor_list[0].__cuda_array_interface__["shape"],
          tensor_list[0].shape(),
      )
      type_str = tensor_list[0].__cuda_array_interface__["typestr"]
      dtype = types.to_numpy_type(tensor_list[0].dtype)
      assert np.dtype(type_str) == np.dtype(dtype)
      assert cp.allclose(arr[0], cp.asanyarray(tensor_list[0]))
  
imports: from nvidia.dali.backend_impl import TensorGPU, TensorListGPU
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.tensors
  import nvidia.dali.types
  import numpy
  from nose_utils import assert_raises, raises
  import cupy
  from test_utils import py_buffer_from_address
label_desc: Use image node_id 4 for calling a global function with example usage: test_cuda_array_interface_tensor_gpu() without return types