code: def parse_args():
      parser = argparse.ArgumentParser(
          description="Self-Attention Graph Pooling"
      )
      parser.add_argument(
          "--dataset",
          type=str,
          default="DD",
          choices=["DD", "PROTEINS", "NCI1", "NCI109", "Mutagenicity"],
          help="DD/PROTEINS/NCI1/NCI109/Mutagenicity",
      )
      parser.add_argument(
          "--batch_size", type=int, default=128, help="batch size"
      )
      parser.add_argument(
          "--lr", type=float, default=5e-4, help="learning rate"
      )
      parser.add_argument(
          "--weight_decay",
          type=float,
          default=1e-4,
          help="weight decay",
      )
      parser.add_argument(
          "--pool_ratio", type=float, default=0.5, help="pooling ratio"
      )
      parser.add_argument(
          "--hid_dim", type=int, default=128, help="hidden size"
      )
      parser.add_argument(
          "--dropout", type=float, default=0.5, help="dropout ratio"
      )
      parser.add_argument(
          "--epochs",
          type=int,
          default=100000,
          help="max number of training epochs",
      )
      parser.add_argument(
          "--patience",
          type=int,
          default=50,
          help="patience for early stopping",
      )
      parser.add_argument(
          "--device", type=int, default=-1, help="device id, -1 for cpu"
      )
      parser.add_argument(
          "--architecture",
          type=str,
          default="hierarchical",
          choices=["hierarchical", "global"],
          help="model architecture",
      )
      parser.add_argument(
          "--dataset_path",
          type=str,
          default="./dataset",
          help="path to dataset",
      )
      parser.add_argument(
          "--conv_layers",
          type=int,
          default=3,
          help="number of conv layers",
      )
      parser.add_argument(
          "--print_every",
          type=int,
          default=10,
          help="print trainlog every k epochs, -1 for silent training",
      )
      parser.add_argument(
          "--num_trials", type=int, default=1, help="number of trials"
      )
      parser.add_argument("--output_path", type=str, default="./output")
  
      args = parser.parse_args()
  
      # device
      args.device = (
          "cpu" if args.device == -1 else "cuda:{}".format(args.device)
      )
      if not torch.cuda.is_available():
          logging.warning(
              "CUDA is not available, use CPU for training."
          )
          args.device = "cpu"
  
      # print every
      if args.print_every == -1:
          args.print_every = args.epochs + 1
  
      # paths
      if not os.path.exists(args.dataset_path):
          os.makedirs(args.dataset_path)
      if not os.path.exists(args.output_path):
          os.makedirs(args.output_path)
      name = "Data={}_Hidden={}_Arch={}_Pool={}_WeightDecay={}_Lr={}.log".format(
          args.dataset,
          args.hid_dim,
          args.architecture,
          args.pool_ratio,
          args.weight_decay,
          args.lr,
      )
      args.output_path = os.path.join(args.output_path, name)
  
      return args
  
file_path: dgl/examples/pytorch/sagpool/main.py
imports: import argparse
  import json
  import logging
  import os
  from time import time
  import dgl
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.data import LegacyTUDataset
  from dgl.dataloading import GraphDataLoader
  from network import get_sag_network
  from torch.utils.data import random_split
  from utils import get_stats
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args