code: def __init__(self, dataset: Generic, random_seed: int = None):
      self.dataset = dataset
      self.num_examples = {"train": -1, "dev": -1, "test": -1}
      np.random.seed(random_seed)
  
      # generate label map
      self.label_map = {}
      try:
          for index, label in enumerate(self.dataset.get_labels()):
              self.label_map[label] = index
          logger.info("Dataset label map = {}".format(self.label_map))
      except:
          # some dataset like squad, its label_list=None
          logger.info(
              "Dataset is None or it has not any labels, label map = {}".format(
                  self.label_map
              )
          )
  
imports: from collections import namedtuple
  from typing import Callable, Generator, Generic, List
  import numpy
  from paddlehub.utils.log import logger
  from paddlehub.compat.task import tokenization
  from paddlehub.compat.task.batch import pad_batch_data
label_desc: Use image node_id 1 to create a new BaseReader object from inherited base classes: object with example: obj = BaseReader(dataset, random_seed)