code: def batch_fn(self, batch_info):
      batch_info = batch_info[0]
      batch_no = batch_info[1]
      epoch = batch_info[0]
      perm = np.arange(0, self.graph.num_nodes)
      batch_nodes = perm[self.cluster_id[epoch] == batch_no]
      eids = extract_edges_from_nodes(self.graph, batch_nodes)
      sub_g = self.graph.subgraph(
          nodes=batch_nodes,
          eid=eids,
          with_node_feat=True,
          with_edge_feat=False,
      )
  
      for key, value in self.graph.edge_feat.items():
          sub_g.edge_feat[key] = self.graph.edge_feat[key][eids]
      return self.batch_func(sub_g)
  
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 2 for calling the RandomPartition obj's underlying member method code with example usage: obj.batch_fn(batch_info) and returns: self