code: def main():
      global device
  
      argparser = argparse.ArgumentParser(
          "GAT implementation on ogbn-products",
          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=250, 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(
          "--no-attn-dst",
          action="store_true",
          help="Don't use attn_dst.",
      )
      argparser.add_argument(
          "--mask-rate", type=float, default=0.5, help="mask rate"
      )
      argparser.add_argument(
          "--n-heads", type=int, default=4, help="number of heads"
      )
      argparser.add_argument(
          "--lr", type=float, default=0.01, help="learning rate"
      )
      argparser.add_argument(
          "--n-layers", type=int, default=3, help="number of layers"
      )
      argparser.add_argument(
          "--n-hidden",
          type=int,
          default=120,
          help="number of hidden units",
      )
      argparser.add_argument(
          "--dropout", type=float, default=0.5, help="dropout rate"
      )
      argparser.add_argument(
          "--input-drop",
          type=float,
          default=0.1,
          help="input drop rate",
      )
      argparser.add_argument(
          "--attn-dropout",
          type=float,
          default=0.0,
          help="attention drop rate",
      )
      argparser.add_argument(
          "--edge-drop", type=float, default=0.1, help="edge drop rate"
      )
      argparser.add_argument(
          "--wd", type=float, default=0, help="weight decay"
      )
      argparser.add_argument(
          "--eval-every",
          type=int,
          default=2,
          help="log every EVAL_EVERY epochs",
      )
      argparser.add_argument(
          "--estimation-mode",
          action="store_true",
          help="Estimate the score of test set for speed during training.",
      )
      argparser.add_argument(
          "--log-every",
          type=int,
          default=2,
          help="log every LOG_EVERY epochs",
      )
      argparser.add_argument(
          "--plot-curves",
          action="store_true",
          help="plot learning curves",
      )
      args = argparser.parse_args()
  
      if args.cpu:
          device = torch.device("cpu")
      else:
          device = torch.device("cuda:%d" % args.gpu)
  
      # load data & preprocess
      (
          graph,
          labels,
          train_idx,
          val_idx,
          test_idx,
          evaluator,
      ) = load_data(dataset)
      graph, labels = preprocess(graph, labels, train_idx)
  
      labels, train_idx, val_idx, test_idx = map(
          lambda x: x.to(device), (labels, train_idx, val_idx, test_idx)
      )
  
      # run
      val_scores, test_scores = [], []
  
      for i in range(1, args.n_runs + 1):
          seed(args.seed + i)
          val_score, test_score = run(
              args,
              graph,
              labels,
              train_idx,
              val_idx,
              test_idx,
              evaluator,
              i,
          )
          val_scores.append(val_score)
          test_scores.append(test_score)
  
      print(args)
      print(f"Runned {args.n_runs} times")
      print("Val scores:", val_scores)
      print("Test scores:", test_scores)
      print(
          f"Average val score: {np.mean(val_scores)} ± {np.std(val_scores)}"
      )
      print(
          f"Average test score: {np.mean(test_scores)} ± {np.std(test_scores)}"
      )
      print(f"Number of params: {count_parameters(args)}")
  
      if args.estimation_mode:
          print(
              "WARNING: Estimation mode is enabled. The final test score is accurate, but not accurate during training time."
          )
  
imports: import argparse
  import math
  import random
  import time
  from collections import OrderedDict
  import dgl
  import dgl.function
  import matplotlib.pyplot
  import numpy
  import torch
  import torch.nn.functional
  import torch.optim
  from dgl.dataloading import DataLoader, MultiLayerFullNeighborSampler, MultiLayerNeighborSampler
  from matplotlib.ticker import AutoMinorLocator, MultipleLocator
  from models import GAT
  from ogb.nodeproppred import DglNodePropPredDataset, Evaluator
  from torch import nn
  from tqdm import tqdm
label_desc: Use image node_id 12 for calling a global function with example usage: main() without return types