code: def __iter__(self):
      for tensor_batch, bucket_idx in self.data_iter:
          for key in tensor_batch.keys():
              if key not in [
                  "src_ex_vocab",
                  "cid",
                  "ind_in_bucket",
                  "cid_line_number",
              ]:
                  tensor_batch[key] = tensor_batch[key].to(self.device)
          yield (tensor_batch, bucket_idx)
  
imports: import torch
  from itertools import cycle
  from onmt.constants import CorpusTask, ModelTask
  from onmt.inputters.text_corpus import get_corpora, build_corpora_iters
  from onmt.inputters.text_utils import text_sort_key, process, numericalize, tensorify, _addcopykeys
  from onmt.transforms import make_transforms
  from onmt.utils.logging import init_logger, logger
  from onmt.utils.misc import RandomShuffler
  from torch.utils.data import DataLoader
label_desc: Use image node_id 2 for calling the OnDeviceDatasetIter obj's underlying member method code with example usage: obj.__iter__() without return types