code: def load_test_data(dir_path="/tmp/malaria", resize_size=(128, 128)):
      dir_path = check_dataset_exist(dirpath=dir_path)
      path_test_label_1 = os.path.join(
          dir_path, "testing_set/Parasitized"
      )
      path_test_label_0 = os.path.join(
          dir_path, "testing_set/Uninfected"
      )
      test_label_1 = load_image_path(os.listdir(path_test_label_1))
      test_label_0 = load_image_path(os.listdir(path_test_label_0))
      labels = []
      Images = np.empty(
          (
              len(test_label_1) + len(test_label_0),
              3,
              resize_size[0],
              resize_size[1],
          ),
          dtype=np.uint8,
      )
      for i in range(len(test_label_0)):
          image_path = os.path.join(path_test_label_0, test_label_0[i])
          temp_image = np.array(
              Image.open(image_path).resize(resize_size).convert("RGB")
          ).transpose(2, 0, 1)
          Images[i] = temp_image
          labels.append(0)
      for i in range(len(test_label_1)):
          image_path = os.path.join(path_test_label_1, test_label_1[i])
          temp_image = np.array(
              Image.open(image_path).resize(resize_size).convert("RGB")
          ).transpose(2, 0, 1)
          Images[i + len(test_label_0)] = temp_image
          labels.append(1)
  
      Images = np.array(Images, dtype=np.float32)
      labels = np.array(labels, dtype=np.int32)
      return Images, labels
  
file_path: singa/examples/malaria_cnn/data/malaria.py
imports: import numpy
  import os
  import sys
  from PIL import Image
label_desc: Use image node_id 2 for calling a global function with example usage: load_test_data(dir_path, resize_size) and returns: Images,  labels