code: def get_test_loader(
      dataset,
      datapath=DATA_PATH,
      test_size=None,
      batch_size=1000,
      transform=None,
      kwargs=None,
      shuffle=False,
  ):
      """Support MNIST and CIFAR10"""
      if kwargs is None:
          kwargs = {}
      if transform is None:
          transform = transforms.ToTensor()
  
      datapath = os.path.join(datapath, dataset)
  
      testset = datasets.__dict__[dataset](
          datapath, train=False, download=True, transform=transform
      )
  
      if test_size is not None:
          testset = Subset(testset, list(range(test_size)))
  
      test_loader = torch.utils.data.DataLoader(
          testset, batch_size=batch_size, shuffle=shuffle, **kwargs
      )
      return test_loader
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import sys
  import pathlib
  from torch.utils.data.dataset import Subset
  import numpy
  import torch
  import torchvision.transforms
  import torchvision.datasets
  from advertorch.test_utils import LeNet5
label_desc: Use image node_id 10 for calling a global function with example usage: get_test_loader(dataset, datapath, test_size, batch_size, transform, kwargs, shuffle) and returns: test_loader