code: def __init__(
      self,
      graph_wrappers=None,
      buf_size=1000,
      batch_size=128,
      num_workers=1,
      sizes=[30, 30],
      shuffle=True,
      dataset=None,
      nodes_idx=None,
  ):
      super(SampleDataGenerator, self).__init__(
          buf_size=buf_size,
          num_workers=num_workers,
          batch_size=batch_size,
          shuffle=shuffle,
      )
      self.sizes = sizes
      self.graph_wrappers = graph_wrappers
      self.dataset = dataset
  
      graph, labels = dataset[0]
      self.graph = graph
      self.num_nodes = graph.num_nodes
      if nodes_idx is not None:
          self.nodes_idx = nodes_idx
      else:
          self.nodes_idx = np.arange(self.num_nodes)
  
      self.labels_all = labels
      self.labels = labels[self.nodes_idx]
  
      self.sample_based_line_example(self.nodes_idx, self.labels)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from __future__ import absolute_import
  from dataloader.base_dataloader import BaseDataGenerator
  from pgl.contrib.ogb.nodeproppred.dataset_pgl import PglNodePropPredDataset
  import tqdm
  from collections import namedtuple
  import pgl
  import numpy
  import copy
label_desc: Use image node_id 1 to create a new SampleDataGenerator object from inherited base classes: BaseDataGenerator with example: obj = SampleDataGenerator(graph_wrappers, buf_size, batch_size, num_workers, sizes, shuffle, dataset, nodes_idx)