code: def __init__(
      self, dataset, samples, batch_size, num_workers, data_type
  ):
      super(DataGenerator, self).__init__(
          buf_size=1000,
          batch_size=batch_size,
          num_workers=num_workers,
          shuffle=True if data_type == "train" else False,
      )
  
      self.dataset = dataset
      self.samples = samples
      if data_type == "train":
          self.line_examples = self.dataset.train_examples
      elif data_type == "eval":
          self.line_examples = self.dataset.eval_examples
      else:
          self.line_examples = self.dataset.test_examples
  
imports: import os
  import tqdm
  import yaml
  import pgl
  import time
  import copy
  import numpy
  import os.path
  from pgl.utils.logger import log
  from pgl.graph import Graph
  from pgl import graph_kernel
  from pgl.sampling.custom import subgraph
  from ogb.lsc import MAG240MDataset, MAG240MEvaluator
  from dataset.base_dataset import BaseDataGenerator
  import time
label_desc: Use image node_id 1 to create a new DataGenerator object from inherited base classes: BaseDataGenerator with example: obj = DataGenerator(dataset, samples, batch_size, num_workers, data_type)