code: def get_data_iters(dataset, batch_size, opt):
      
      if dataset == 'mnist':
          train_data, val_data = get_mnist_iterator(batch_size, (1, 28, 28),
                                                    num_parts=kv.num_workers, part_index=kv.rank)
      elif dataset == 'cifar10':
          train_data, val_data = get_cifar10_iterator(batch_size, (3, 32, 32),
                                                      num_parts=kv.num_workers, part_index=kv.rank)
      elif dataset == 'imagenet':
          shape_dim = 299 if model_name == 'inceptionv3' else 224
  
          if not opt.data_dir:
              raise ValueError('Dir containing raw images in train/val is required for imagenet.'
                               'Please specify "--data-dir"')
  
          train_data, val_data = get_imagenet_iterator(opt.data_dir, batch_size,
                                                                  opt.num_workers, shape_dim, opt.dtype)
      elif dataset == 'caltech101':
          train_data, val_data = get_caltech101_iterator(batch_size, opt.num_workers, opt.dtype)
      elif dataset == 'dummy':
          shape_dim = 299 if model_name == 'inceptionv3' else 224
          train_data, val_data = dummy_iterator(batch_size, (3, shape_dim, shape_dim))
      return train_data, val_data
docs: get dataset iterators