code: def __init__(self, config):
      self.image_home = config["StyleSampler"]["image_home"]
      label_file = config["StyleSampler"]["label_file"]
      self.dataset_with_label = config["StyleSampler"]["with_label"]
      self.height = config["Global"]["image_height"]
      self.index = 0
      with open(label_file, "r") as f:
          label_raw = f.read()
          self.path_label_list = label_raw.split("\n")[:-1]
      assert len(self.path_label_list) > 0
      random.shuffle(self.path_label_list)
  
file_path: PaddleOCR/StyleText/engine/style_samplers.py
imports: import numpy
  import random
  import cv2
label_desc: Use image node_id 1 to create a new DatasetSampler object from inherited base classes: object with example: obj = DatasetSampler(config)