code: def parse_args():
      parser = argparse.ArgumentParser(description="HGP-SL-DGL")
      parser.add_argument(
          "--dataset",
          type=str,
          default="DD",
          choices=[
              "DD",
              "PROTEINS",
              "NCI1",
              "NCI109",
              "Mutagenicity",
              "ENZYMES",
          ],
          help="DD/PROTEINS/NCI1/NCI109/Mutagenicity/ENZYMES",
      )
      parser.add_argument(
          "--batch_size", type=int, default=512, help="batch size"
      )
      parser.add_argument(
          "--sample", type=str, default="true", help="use sample method"
      )
      parser.add_argument(
          "--lr", type=float, default=1e-3, help="learning rate"
      )
      parser.add_argument(
          "--weight_decay",
          type=float,
          default=1e-3,
          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(
          "--conv_layers",
          type=int,
          default=3,
          help="number of conv layers",
      )
      parser.add_argument(
          "--dropout", type=float, default=0.0, help="dropout ratio"
      )
      parser.add_argument(
          "--lamb", type=float, default=1.0, help="trade-off parameter"
      )
      parser.add_argument(
          "--epochs",
          type=int,
          default=1000,
          help="max number of training epochs",
      )
      parser.add_argument(
          "--patience",
          type=int,
          default=100,
          help="patience for early stopping",
      )
      parser.add_argument(
          "--device", type=int, default=-1, help="device id, -1 for cpu"
      )
      parser.add_argument(
          "--dataset_path",
          type=str,
          default="./dataset",
          help="path to dataset",
      )
      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
  
      # bool args
      if args.sample.lower() == "true":
          args.sample = True
      else:
          args.sample = False
  
      # 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={}_Pool={}_WeightDecay={}_Lr={}_Sample={}.log".format(
          args.dataset,
          args.hid_dim,
          args.pool_ratio,
          args.weight_decay,
          args.lr,
          args.sample,
      )
      args.output_path = os.path.join(args.output_path, name)
  
      return args
  
file_path: dgl/examples/pytorch/hgp_sl/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 networks import HGPSLModel
  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