code: def list_reader(self, list_file):
      img_list = []
      with open(list_file, "r") as f:
          lines = f.readlines()
  
      pid_container = set()
      for line in lines:
          pid = int(line.strip().split(" ")[1])
          pid_container.add(pid)
      pid2label = {
          pid: label for label, pid in enumerate(pid_container)
      }
  
      for line in lines:
          img_name, pid = line.strip().split(" ")
          if not os.path.exists(os.path.join(self.img_root, img_name)):
              continue
          label = pid2label[int(pid)]
          img_list.append((img_name, label))
  
      return img_list, len(pid_container)
  
imports: from PIL import Image
  import os
  import torch.utils.data
  import torchvision.transforms
  from torch.utils.data.sampler import Sampler
  import numpy
label_desc: Use image node_id 5 for calling the Real_Dataset_112 obj's underlying member method code with example usage: obj.list_reader(list_file) and returns: img_list,  len