code: def main():
      global device, n_node_feats, n_classes, epsilon
  
      argparser = argparse.ArgumentParser(
          "GAT implementation on ogbn-arxiv",
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
      argparser.add_argument(
          "--cpu",
          action="store_true",
          help="CPU mode. This option overrides --gpu.",
      )
      argparser.add_argument(
          "--gpu", type=int, default=0, help="GPU device ID."
      )
      argparser.add_argument("--seed", type=int, default=0, help="seed")
      argparser.add_argument(
          "--n-runs", type=int, default=10, help="running times"
      )
      argparser.add_argument(
          "--n-epochs", type=int, default=2000, help="number of epochs"
      )
      argparser.add_argument(
          "--use-labels",
          action="store_true",
          help="Use labels in the training set as input features.",
      )
      argparser.add_argument(
          "--n-label-iters",
          type=int,
          default=0,
          help="number of label iterations",
      )
      argparser.add_argument(
          "--mask-rate", type=float, default=0.5, help="mask rate"
      )
      argparser.add_argument(
          "--no-attn-dst",
          action="store_true",
          help="Don't use attn_dst.",
      )
      argparser.add_argument(
          "--use-norm",
          action="store_true",
          help="Use symmetrically normalized adjacency matrix.",
      )
      argparser.add_argument(
          "--lr", type=float, default=0.002, help="learning rate"
      )
      argparser.add_argument(
          "--n-layers", type=int, default=3, help="number of layers"
      )
      argparser.add_argument(
          "--n-heads", type=int, default=3, help="number of heads"
      )
      argparser.add_argument(
          "--n-hidden",
          type=int,
          default=250,
          help="number of hidden units",
      )
      argparser.add_argument(
          "--dropout", type=float, default=0.75, help="dropout rate"
      )
      argparser.add_argument(
          "--input-drop",
          type=float,
          default=0.1,
          help="input drop rate",
      )
      argparser.add_argument(
          "--attn-drop",
          type=float,
          default=0.0,
          help="attention drop rate",
      )
      argparser.add_argument(
          "--edge-drop", type=float, default=0.0, help="edge drop rate"
      )
      argparser.add_argument(
          "--wd", type=float, default=0, help="weight decay"
      )
      argparser.add_argument(
          "--log-every",
          type=int,
          default=20,
          help="log every LOG_EVERY epochs",
      )
      argparser.add_argument(
          "--plot-curves",
          action="store_true",
          help="plot learning curves",
      )
      argparser.add_argument(
          "--save-pred",
          action="store_true",
          help="save final predictions",
      )
      args = argparser.parse_args()
  
      if not args.use_labels and args.n_label_iters > 0:
          raise ValueError(
              "'--use-labels' must be enabled when n_label_iters > 0"
          )
  
      if args.cpu:
          device = torch.device("cpu")
      else:
          device = torch.device(f"cuda:{args.gpu}")
  
      # load data & preprocess
      (
          graph,
          labels,
          train_idx,
          val_idx,
          test_idx,
          evaluator,
      ) = load_data(dataset)
      graph = preprocess(graph)
  
      graph, labels, train_idx, val_idx, test_idx = map(
          lambda x: x.to(device),
          (graph, labels, train_idx, val_idx, test_idx),
      )
  
      # run
      val_accs, test_accs = [], []
  
      for i in range(args.n_runs):
          seed(args.seed + i)
          val_acc, test_acc = run(
              args,
              graph,
              labels,
              train_idx,
              val_idx,
              test_idx,
              evaluator,
              i + 1,
          )
          val_accs.append(val_acc)
          test_accs.append(test_acc)
  
      print(args)
      print(f"Runned {args.n_runs} times")
      print("Val Accs:", val_accs)
      print("Test Accs:", test_accs)
      print(
          f"Average val accuracy: {np.mean(val_accs)} ± {np.std(val_accs)}"
      )
      print(
          f"Average test accuracy: {np.mean(test_accs)} ± {np.std(test_accs)}"
      )
      print(f"Number of params: {count_parameters(args)}")
  
imports: import argparse
  import math
  import os
  import random
  import time
  import dgl
  import numpy
  import torch
  import torch.nn.functional
  import torch.optim
  from matplotlib import pyplot
  from matplotlib.ticker import AutoMinorLocator, MultipleLocator
  from models import GAT
  from ogb.nodeproppred import DglNodePropPredDataset, Evaluator
label_desc: Use image node_id 12 for calling a global function with example usage: main() without return types