code: def __init__(
      self, batch_func, graph, num_cluster, epoch, shuffle=True
  ):
      self.graph = graph
      self.num_cluster = num_cluster
      self.batch_func = batch_func
  
      self.epoch = epoch
      self.cluster_id = [
          np.random.randint(
              low=0, high=num_cluster, size=graph.num_nodes
          )
          for _ in range(epoch)
      ]
  
      super(RandomPartition, self).__init__(
          buf_size=1000,
          num_workers=num_cluster,
          batch_size=1,
          shuffle=False,
      )
  
      self.line_examples = []
      for i in range(epoch):
          for j in range(num_cluster):
              self.line_examples.append((i, j))
  
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
  import os
  import pgl
  import sys
  import json
  import numpy
  from dataset.base_dataset import BaseDataGenerator
  from pgl.sample import alias_sample
  from pgl.sample import pinsage_sample
  from pgl.sample import graphsage_sample
  from pgl.sample import edge_hash
  from pgl.sample import extract_edges_from_nodes
label_desc: Use image node_id 1 to create a new RandomPartition object from inherited base classes: BaseDataGenerator with example: obj = RandomPartition(batch_func, graph, num_cluster, epoch, shuffle)