code: def main(args, seed):
      # load and preprocess dataset
      if args.dataset.startswith("ogbn"):
          # Open Graph Benchmark datasets
          data = prepare_ogbn_graph_data(args)
      else:
          # DGL datasets
          data = prepare_dgl_graph_data(args)
  
      (
          features,
          dgl_graph,
          train_mask,
          val_mask,
          test_mask,
          labels,
          num_feats,
          n_classes,
          n_edges,
      ) = (
          data["features"],
          data["graph"],
          data["train_mask"],
          data["val_mask"],
          data["test_mask"],
          data["labels"],
          data["num_feats"],
          data["n_classes"],
          data["n_edges"],
      )
  
      adj = data["adj"]
  
      # Configure
      np.random.seed(seed)
      torch.manual_seed(seed)
  
      if not args.no_cuda and torch.cuda.is_available():
          print("[ Using CUDA ]")
          device = torch.device(
              "cuda" if args.gpu < 0 else "cuda:%d" % args.gpu
          )
          cudnn.benchmark = True
          torch.cuda.manual_seed(seed)
      else:
          device = torch.device("cpu")
  
      features = features.to(device)
      labels = labels.to(device)
      train_mask = train_mask.to(device)
      val_mask = val_mask.to(device)
      test_mask = test_mask.to(device)
  
      adj = adj.to(device)
  
      dgl_graph = dgl_graph.to(device)
  
      dgl_graph.ndata["node_feat"] = features
  
      # convert DGLGraph to GraphData
      g = GraphData()
      g.from_dgl(dgl_graph)
  
      g.edge_features["edge_weight"] = (
          torch.Tensor([1] * g.get_edge_num())
          .float()
          .view(-1, 1)
          .to(device)
      )
      g.edge_features["reverse_edge_weight"] = (
          torch.Tensor([1] * g.get_edge_num())
          .float()
          .view(-1, 1)
          .to(device)
      )
      g.graph_attributes["adj_t"] = adj
      g = g.to(device)
  
      # create model
      model = GNNClassifier(
          args.num_layers,
          num_feats,
          args.num_hidden,
          n_classes,
          direction_option=args.direction_option,
          feat_drop=args.feat_drop,
          activation=F.elu,
          use_edge_weight=False,
      )
  
      # model = GCN(args.num_layers,
      #             num_feats,
      #             args.num_hidden,
      #             n_classes,
      #             args.feat_drop)
  
      print(model)
      model.to(device)
  
      if args.early_stop:
          stopper = EarlyStopping(
              "{}.{}".format(args.save_model_path, seed),
              patience=args.patience,
          )
  
      loss_fcn = torch.nn.CrossEntropyLoss()
      # loss_fcn = torch.nn.NLLLoss()
  
      # use optimizer
      optimizer = torch.optim.Adam(model.parameters(), lr=args.lr)
  
      # initialize graph
      dur = []
      for epoch in range(args.epochs):
          model.train()
          if epoch >= 3:
              t0 = time.time()
          # forward
          logits = model(g)
          loss = loss_fcn(logits[train_mask], labels[train_mask])
  
          optimizer.zero_grad()
          loss.backward()
          optimizer.step()
  
          if epoch >= 3:
              dur.append(time.time() - t0)
  
          train_acc = accuracy(logits[train_mask], labels[train_mask])
  
          if args.fastmode:
              val_acc = accuracy(logits[val_mask], labels[val_mask])
          else:
              val_acc = evaluate(model, g, labels, val_mask)
              if args.early_stop:
                  if stopper.step(val_acc, model):
                      break
  
          print(
              "Epoch {:05d} | Time(s) {:.4f} | Loss {:.4f} | TrainAcc {:.4f} |"
              " ValAcc {:.4f} | ETputs(KTEPS) {:.2f}".format(
                  epoch,
                  np.mean(dur),
                  loss.item(),
                  train_acc,
                  val_acc,
                  n_edges / np.mean(dur) / 1000,
              )
          )
  
      print()
      if args.early_stop:
          model = stopper.load_checkpoint(model)
          print("Restored best saved model")
          os.remove(stopper.save_model_path)
          print("Removed best saved model file to save disk space")
  
      acc = evaluate(model, g, labels, test_mask)
      print("Test Accuracy {:.4f}".format(acc))
  
      return acc
  
imports: import argparse
  import os
  import time
  import warnings
  from collections import namedtuple
  import dgl
  import networkx
  import numpy
  import torch
  import torch.backends.cudnn
  import torch.nn
  import torch.nn.functional
  from dgl import DGLGraph
  from dgl.data import load_data
  from ...data.data import GraphData
  from ...modules.graph_embedding_learning.gcn import GCN
  from ...modules.utils.generic_utils import EarlyStopping, get_config, grid, print_config
label_desc: Use image node_id 5 for calling a global function with example usage: main(args, seed) and returns: acc