code: def main(args, seed):
      # 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")
  
      # 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,
          g,
          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"],
      )
  
      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)
      g.ndata["node_feat"] = features
  
      if args.gl_type == "node_emb_refined":
          init_adj = get_normalized_init_adj(g).to(device)
          g.init_adj = init_adj
  
      raw_text_data = [
          ["I like nlp.", "Same here!"],
          ["I like graph.", "Same here!"],
      ]
      vocab_model = VocabModel(
          raw_text_data,
          max_word_vocab_size=None,
          min_word_vocab_freq=1,
          word_emb_size=300,
      )
  
      embedding_styles = {
          "word_emb_type": "w2v",
          "node_edge_emb_strategy": "bilstm",
          "seq_info_encode_strategy": "none",
      }
  
      # create model
      model = DynamicGNNClassifier(
          vocab_model.word_vocab,
          embedding_styles,
          num_feats,
          args.num_hidden,
          n_classes,
          args.gl_type,
          gl_metric_type=args.gl_metric_type,
          gl_num_heads=args.gl_num_heads,
          gl_top_k=args.gl_top_k,
          gl_epsilon=args.gl_epsilon,
          gl_smoothness_ratio=args.gl_smoothness_ratio,
          gl_connectivity_ratio=args.gl_connectivity_ratio,
          gl_sparsity_ratio=args.gl_sparsity_ratio,
          gl_input_size=num_feats,
          gl_hidden_size=args.gl_num_hidden,
          init_adj_alpha=args.init_adj_alpha,
          feat_drop=args.in_drop,
          layer_drop=args.layer_drop,
          activation=F.relu,
          device=device,
      )
  
      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()
  
      # use optimizer
      optimizer = torch.optim.Adam(
          model.parameters(), lr=args.lr, weight_decay=args.weight_decay
      )
  
      # initialize graph
      dur = []
      for epoch in range(args.epochs):
          model.train()
          if epoch >= 3:
              t0 = time.time()
          # forward
          logits, dgl_graph = model(g)
          loss = loss_fcn(logits[train_mask], labels[train_mask])
          loss += dgl_graph.graph_reg
  
          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 dgl
  import dgl.function
  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, register_data_args
  from scipy import sparse
  from ...modules.graph_construction import NodeEmbeddingBasedGraphConstruction, NodeEmbeddingBasedRefinedGraphConstruction
  from ...modules.utils.vocab_utils import VocabModel
  from ..utils import EarlyStopping
label_desc: Use image node_id 8 for calling a global function with example usage: main(args, seed) and returns: acc