code: def main():
      import argparse
  
      parser = argparse.ArgumentParser()
      parser.add_argument("--repeat", type=int, default=10)
      parser.add_argument(
          "--dataset",
          type=str,
          choices=[
              "MUTAG",
              "COLLAB",
              "IMDBBINARY",
              "IMDBMULTI",
              "NCI1",
              "PROTEINS",
              "PTC",
              "REDDITBINARY",
              "REDDITMULTI5K",
          ],
          default="MUTAG",
      )
  
      args = parser.parse_args()
  
      device = torch.device("cuda")
      dataset_ = GINDataset(args.dataset, False)
      dataset = DatasetAbstraction(
          [g[0] for g in dataset_], [g[1] for g in dataset_]
      )
  
      # 1. split dataset [fix split]
      dataids = list(range(len(dataset)))
      random.seed(2021)
      random.shuffle(dataids)
  
      fold = int(len(dataset) * 0.1)
      train_dataset = dataset[dataids[: fold * 8]]
      val_dataset = dataset[dataids[fold * 8 : fold * 9]]
      test_dataset = dataset[dataids[fold * 9 :]]
  
      trainloader = GraphDataLoader(
          train_dataset, batch_size=32, shuffle=True
      )
      valloader = GraphDataLoader(
          val_dataset, batch_size=32, shuffle=False
      )
      testloader = GraphDataLoader(
          test_dataset, batch_size=32, shuffle=False
      )
  
      accs = []
      for seed in tqdm(range(args.repeat)):
          # set up seeds, args.seed supported
          set_seed(seed)
  
          model = GIN(
              5,
              2,
              dataset_.dim_nfeats,
              64,
              dataset_.gclasses,
              0.5,
              False,
              "sum",
              "sum",
          ).to(device)
  
          criterion = nn.CrossEntropyLoss()  # defaul reduce is true
          optimizer = optim.Adam(model.parameters(), lr=0.0001)
  
          model = train(
              model,
              trainloader,
              valloader,
              optimizer,
              criterion,
              100,
              device,
          )
          acc = eval_net(model, testloader, device)
          accs.append(acc)
  
      print(
          "{:.2f} ~ {:.2f}".format(
              np.mean(accs) * 100, np.std(accs) * 100
          )
      )
  
imports: import pickle
  from dgl.dataloading import GraphDataLoader
  import numpy
  from tqdm import tqdm
  import random
  import torch
  import torch.nn
  import torch.optim
  from dgl.data import GINDataset
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.nn.pytorch.conv import GINConv
  from dgl.nn.pytorch.glob import SumPooling, AvgPooling, MaxPooling
label_desc: Use image node_id 4 for calling a global function with example usage: main() without return types