code: def build_graph_model(
      graph_wrapper,
      num_class,
      k_hop,
      graphsage_type,
      hidden_size,
      feature,
  ):
      """Test"""
      node_index = fluid.layers.data(
          "node_index",
          shape=[None],
          dtype="int64",
          append_batch_size=False,
      )
  
      node_label = fluid.layers.data(
          "node_label",
          shape=[None, 1],
          dtype="int64",
          append_batch_size=False,
      )
  
      for i in range(k_hop):
          if graphsage_type == "graphsage_mean":
              feature = graphsage_mean(
                  graph_wrapper,
                  feature,
                  hidden_size,
                  act="relu",
                  name="graphsage_mean_%s % i",
              )
          elif graphsage_type == "graphsage_meanpool":
              feature = graphsage_meanpool(
                  graph_wrapper,
                  feature,
                  hidden_size,
                  act="relu",
                  name="graphsage_meanpool_%s % i",
              )
          elif graphsage_type == "graphsage_maxpool":
              feature = graphsage_maxpool(
                  graph_wrapper,
                  feature,
                  hidden_size,
                  act="relu",
                  name="graphsage_maxpool_%s % i",
              )
          elif graphsage_type == "graphsage_lstm":
              feature = graphsage_lstm(
                  graph_wrapper,
                  feature,
                  hidden_size,
                  act="relu",
                  name="graphsage_maxpool_%s % i",
              )
          else:
              raise ValueError(
                  "graphsage type %s is not"
                  " implemented" % graphsage_type
              )
  
      feature = fluid.layers.gather(feature, node_index)
      logits = fluid.layers.fc(
          feature, num_class, act=None, name="classification_layer"
      )
      proba = fluid.layers.softmax(logits)
  
      loss = fluid.layers.softmax_with_cross_entropy(
          logits=logits, label=node_label
      )
      loss = fluid.layers.mean(loss)
      acc = fluid.layers.accuracy(input=proba, label=node_label, k=1)
      return loss, acc
  
file_path: PGL/legacy/examples/graphsage/train_scale.py
imports: import argparse
  import time
  import numpy
  import scipy.sparse
  from sklearn.preprocessing import StandardScaler
  import pgl
  from pgl.utils.logger import log
  from pgl.utils import paddle_helper
  import paddle
  import paddle.fluid
  import reader
  from model import graphsage_mean, graphsage_meanpool, graphsage_maxpool, graphsage_lstm
label_desc: Use image node_id 3 for calling a global function with example usage: build_graph_model(graph_wrapper, num_class, k_hop, graphsage_type, hidden_size, feature) and returns: loss,  acc