code: def __iter__(self):
      # return a copy, so that the iteration number doesn't collide
      return TestIterator(
          self.n,
          self.batch_size,
          self.dims,
          self.as_tensor,
          self.device,
      )
  
file_path: DALI/dali/test/python/test_external_source_pytorch_dlpack.py
imports: import numpy
  import nvidia.dali.fn
  import nvidia.dali.ops
  import torch
  from nvidia.dali.backend_impl import *
  from nvidia.dali import Pipeline
  from torch.utils.dlpack import to_dlpack, from_dlpack
  from test_utils import check_output
label_desc: Use image node_id 3 for calling the TestIterator obj's underlying member method code with example usage: obj.__iter__() and returns: TestIterator