class_docstr: A very simple `DataLoader` that is mostly used for testing.
code: def __init__(
      self,
      instances: List[Instance],
      batch_size: int,
      *,
      shuffle: bool = False,
      batches_per_epoch: Optional[int] = None,
      vocab: Optional[Vocabulary] = None,
  ) -> None:
      self.instances = instances
      self.batch_size = batch_size
      self.shuffle = shuffle
      self.batches_per_epoch = batches_per_epoch
      self.vocab = vocab
      self.cuda_device: Optional[torch.device] = None
      self._batch_generator: Optional[Iterator[TensorDict]] = None
      self.collate_fn = DefaultDataCollator()
  
imports: import math
  import random
  from typing import Optional, List, Iterator
  import torch
  from allennlp.common.util import lazy_groups_of
  from allennlp.common.tqdm import Tqdm
  from allennlp.data.data_loaders.data_loader import DataLoader, TensorDict
  from allennlp.data.data_loaders.data_collator import DefaultDataCollator
  from allennlp.data.dataset_readers import DatasetReader
  from allennlp.data.instance import Instance
  from allennlp.data.vocabulary import Vocabulary
  import allennlp.nn.util
label_desc: Use image node_id 1 to create a new SimpleDataLoader object from inherited base classes: DataLoader with example: obj = SimpleDataLoader(instances, batch_size)