code: def __init__(self, config, mode, logger, seed=None):
      super(LMDBDataSet, self).__init__()
  
      global_config = config["Global"]
      dataset_config = config[mode]["dataset"]
      loader_config = config[mode]["loader"]
      batch_size = loader_config["batch_size_per_card"]
      data_dir = dataset_config["data_dir"]
      self.do_shuffle = loader_config["shuffle"]
  
      self.lmdb_sets = self.load_hierarchical_lmdb_dataset(data_dir)
      logger.info("Initialize indexs of datasets:%s" % data_dir)
      self.data_idx_order_list = self.dataset_traversal()
      if self.do_shuffle:
          np.random.shuffle(self.data_idx_order_list)
      self.ops = create_operators(
          dataset_config["transforms"], global_config
      )
      self.ext_op_transform_idx = dataset_config.get(
          "ext_op_transform_idx", 1
      )
  
      ratio_list = dataset_config.get("ratio_list", [1.0])
      self.need_reset = True in [x < 1 for x in ratio_list]
  
imports: import numpy
  import os
  from paddle.io import Dataset
  import lmdb
  import cv2
  import string
  import six
  import pickle
  from PIL import Image
  from .imaug import transform, create_operators
label_desc: Use image node_id 1 to create a new LMDBDataSet object from inherited base classes: Dataset with example: obj = LMDBDataSet(config, mode, logger, seed)