code: def main():
      global device
  
      argparser = argparse.ArgumentParser(
          "GAT implementation 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, default=0, help="random seed"
      )
      argparser.add_argument(
          "--n-runs", type=int, default=10, help="running times"
      )
      argparser.add_argument(
          "--n-epochs", type=int, default=1200, 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(
          "--no-attn-dst",
          action="store_true",
          help="Don't use attn_dst.",
      )
      argparser.add_argument(
          "--n-heads", type=int, default=6, help="number of heads"
      )
      argparser.add_argument(
          "--lr", type=float, default=0.01, help="learning rate"
      )
      argparser.add_argument(
          "--n-layers", type=int, default=6, help="number of layers"
      )
      argparser.add_argument(
          "--n-hidden",
          type=int,
          default=80,
          help="number of hidden units",
      )
      argparser.add_argument(
          "--dropout", type=float, default=0.25, 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 dropout 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=5,
          help="evaluate every EVAL_EVERY epochs",
      )
      argparser.add_argument(
          "--log-every",
          type=int,
          default=5,
          help="log every LOG_EVERY epochs",
      )
      argparser.add_argument(
          "--plot", action="store_true", help="plot learning curves"
      )
      argparser.add_argument(
          "--save-pred",
          action="store_true",
          help="save final predictions",
      )
      args = argparser.parse_args()
  
      if args.cpu:
          device = torch.device("cpu")
      else:
          device = torch.device(f"cuda:{args.gpu}")
  
      # load data & preprocess
      print("Loading data")
      (
          graph,
          labels,
          train_idx,
          val_idx,
          test_idx,
          evaluator,
      ) = load_data(dataset)
      print("Preprocessing")
      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(args.n_runs):
          print("Running", i)
          seed(args.seed + i)
          val_score, test_score = run(
              args,
              graph,
              labels,
              train_idx,
              val_idx,
              test_idx,
              evaluator,
              i + 1,
          )
          val_scores.append(val_score)
          test_scores.append(test_score)
  
      print(" ".join(sys.argv))
      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)}")
  
imports: import argparse
  import os
  import random
  import sys
  import time
  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
label_desc: Use image node_id 10 for calling a global function with example usage: main() without return types