code: def main(args, config):
      log.info("Loading %s dataset." % config.data_name)
      dataset, data_mode = load_dataset(config.data_name)
  
      log.info(
          "Running into %d %s graph partitions."
          % (config.num_parts, args.partition)
      )
      if args.partition == "metis":
          permutation, part = metis_graph_partition(
              dataset.graph, npart=config.num_parts
          )
      elif args.partition == "random":
          permutation, part = random_graph_partition(
              dataset.graph, npart=config.num_parts
          )
      else:
          raise ValueError(
              "%s graph partition methods not supported"
              % args.partition
          )
  
      log.info("Permuting dataset and feature.")
      dataset, feature = permute(
          dataset, dataset.feature, permutation, config.feat_gpu
      )
      graph = dataset.graph
  
      log.info("Building data loader for training and inference.")
      train_loader, eval_loader, final_epochs = create_dataloaders(
          graph,
          data_mode,
          part,
          args.num_workers,
          config,
          args.load_epoch,
      )
      gcn_norm = compute_gcn_norm(graph, config.gcn_norm)
  
      log.info("Calculating buffer size for GNNAutoScale.")
      buffer_size = compute_buffer_size(eval_loader)
      log.info("Buffer size: %d" % buffer_size)
  
      GNNModel = getattr(gnn_models, config.model_name)
      model = GNNModel(
          num_nodes=graph.num_nodes,
          input_size=feature.shape[1],
          output_size=dataset.num_classes,
          buffer_size=buffer_size,
          **config,
      )
  
      if config.grad_norm:
          clip = paddle.nn.ClipGradByNorm(clip_norm=1.0)
      else:
          clip = None
      optim = paddle.optimizer.Adam(
          learning_rate=config.lr,
          weight_decay=config.weight_decay,
          parameters=model.parameters(),
          grad_clip=clip,
      )
  
      criterion = paddle.nn.loss.CrossEntropyLoss()
  
      if data_mode == "s":
          eval_graph = pgl.Graph(
              edges=graph.edges, num_nodes=graph.num_nodes
          )
          eval_graph.tensor()
      else:
          eval_graph = graph
      best_val_acc = final_test_acc = log_epoch = 0
      num_batches = config.num_parts / config.batch_size
      for epoch in range(final_epochs):
          best_val_acc, final_test_acc, log_epoch = train_eval(
              model,
              feature,
              gcn_norm,
              criterion,
              optim,
              dataset,
              data_mode,
              eval_graph,
              best_val_acc,
              final_test_acc,
              num_batches,
              log_epoch,
              train_loader,
              eval_loader,
          )
  
      log.info(
          "Final Valid Acc: %.4f, Final Test Acc: %.4f"
          % (best_val_acc, final_test_acc)
      )
  
imports: import os
  import sys
  import argparse
  from functools import partial
  import yaml
  from tqdm import tqdm
  from easydict import EasyDict
  import numpy
  import paddle
  import pgl
  from pgl.utils.logger import log
  import gnn_models
  from dataset import load_dataset, create_dataloaders
  from graph_partition import random_graph_partition
  from graph_partition import metis_graph_partition
  from utils import check_device, process_batch_data, compute_buffer_size
  from utils import generate_mask, permute, compute_gcn_norm, compute_acc
label_desc: Use image node_id 5 for calling a global function with example usage: main(args, config) without return types