code: def create_test_data_loader(
      dir, batch_size, num_workers, transform, subset=50
  ):
      """
      This function is to create a fixed dataset without any randomness
      """
      train_set = CIFAR10(
          root=dir, train=False, download=True, transform=transform
      )
      # `subset` is the number of subsets. The larger the number, the smaller the training set.
      mask = list(range(0, len(train_set), subset))
      train_subset = torch.utils.data.Subset(train_set, mask)
  
      data_loader = DataLoader(
          train_subset,
          batch_size=batch_size,
          shuffle=False,
          num_workers=num_workers,
      )
      return data_loader
  
file_path: BigDL/python/nano/test/pytorch/utils/_train_torch_lightning.py
imports: import torch
  from copy import deepcopy
  import pytorch_lightning
  import torchvision.transforms
  from torchvision.datasets import CIFAR10
  from torch.utils.data import DataLoader
  from torch.utils.data.sampler import SequentialSampler
  from bigdl.nano.pytorch.vision.models import ImageClassifier
label_desc: Use image node_id 2 for calling a global function with example usage: create_test_data_loader(dir, batch_size, num_workers, transform, subset) and returns: data_loader