code: def test_tensorlist_getitem_gpu():
      arr = np.random.rand(3, 5, 6)
      pipe = ExternalSourcePipe(arr.shape[0], arr)
      pipe.build()
      tensorlist = pipe.run()[0]
      list_of_tensors = [x for x in tensorlist]
  
      assert type(tensorlist[0]) is not cp.ndarray
      assert type(tensorlist[0]) is TensorGPU
      assert type(tensorlist[-3]) is TensorGPU
      assert len(list_of_tensors) == len(tensorlist)
      with assert_raises(
          IndexError, glob="TensorListCPU index out of range"
      ):
          tensorlist[len(tensorlist)]
      with assert_raises(
          IndexError, glob="TensorListCPU index out of range"
      ):
          tensorlist[-len(tensorlist) - 1]
  
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 1 for calling a global function with example usage: test_tensorlist_getitem_gpu() without return types