code: def main():
      global device
  
      argparser = argparse.ArgumentParser(
          "GAT on OGBN-Proteins",
          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, help="seed", default=0)
      argparser.add_argument("--n-runs", type=int, default=10)
      argparser.add_argument("--n-epochs", type=int, default=500)
      argparser.add_argument("--lr", type=float, default=0.01)
      argparser.add_argument("--n-layers", type=int, default=4)
      argparser.add_argument("--n-hidden", type=int, default=480)
      argparser.add_argument("--dropout", type=float, default=0.2)
      argparser.add_argument("--input-drop", type=float, default=0)
      argparser.add_argument("--wd", type=float, default=0)
      argparser.add_argument(
          "--estimation-mode",
          action="store_true",
          help="Estimate the score of test set for speed.",
      )
      argparser.add_argument(
          "--eval-last",
          action="store_true",
          help="Evaluate the score of test set at last.",
      )
      argparser.add_argument("--eval-every", type=int, default=1)
      argparser.add_argument("--log-every", type=int, default=1)
      argparser.add_argument("--plot-curves", action="store_true")
      args = argparser.parse_args()
  
      if args.cpu:
          device = torch.device("cpu")
      else:
          device = torch.device("cuda:%d" % args.gpu)
  
      if args.estimation_mode:
          print(
              "WARNING: Estimation mode is enabled. The test score is not accurate."
          )
  
      seed(args.seed)
  
      (
          graph,
          labels,
          train_idx,
          val_idx,
          test_idx,
          evaluator,
      ) = load_data(dataset)
      graph, labels = preprocess(graph, labels)
      graph.create_formats_()
  
      # graph = graph.to(device)
      labels = labels.to(device)
      train_idx = train_idx.to(device)
      val_idx = val_idx.to(device)
      test_idx = test_idx.to(device)
      if args.estimation_mode:
          test_idx = test_idx[
              torch.arange(start=0, end=len(test_idx), step=50)
          ]
  
      val_scores, test_scores = [], []
  
      for i in range(1, args.n_runs + 1):
          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 test score is not accurate."
          )
  
imports: import argparse
  import math
  import random
  import time
  from collections import OrderedDict
  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 MLP
  from ogb.nodeproppred import DglNodePropPredDataset, Evaluator
  from torch import nn
  from tqdm import tqdm
label_desc: Use image node_id 10 for calling a global function with example usage: main() without return types