code: def batch_fn(batch_ex, graph, samples):
      batch_train_samples = []
      batch_train_labels = []
      for i, l in batch_ex:
          batch_train_samples.append(i)
          batch_train_labels.append(l)
  
      subgraphs = graphsage_sample(graph, batch_train_samples, samples)
      subgraph, sample_index, node_index = subgraphs[0]
  
      node_label = np.array(batch_train_labels, dtype="int64").reshape(
          [-1, 1]
      )
  
      return subgraph, sample_index, node_index, node_label
  
file_path: PGL/examples/graphsage/cpu_sample_version/dataset.py
imports: import os
  import paddle
  import numpy
  from pgl import graph_kernel
  from pgl.utils.logger import log
  from pgl.sampling import graphsage_sample
  from pgl.utils.data import Dataset
label_desc: Use image node_id 1 for calling a global function with example usage: batch_fn(batch_ex, graph, samples) and returns: subgraph,  sample_index,  node_index,  node_label