code: def config():
      parser = argparse.ArgumentParser(description="GCMC")
      parser.add_argument("--seed", default=123, type=int)
      parser.add_argument(
          "--device",
          default="0",
          type=int,
          help="Running device. E.g `--device 0`, if using cpu, set `--device -1`",
      )
      parser.add_argument(
          "--save_dir", type=str, help="The saving directory"
      )
      parser.add_argument(
          "--save_id", type=int, help="The saving log id"
      )
      parser.add_argument("--silent", action="store_true")
      parser.add_argument(
          "--data_name",
          default="ml-1m",
          type=str,
          help="The dataset name: ml-100k, ml-1m, ml-10m",
      )
      parser.add_argument(
          "--data_test_ratio", type=float, default=0.1
      )  ## for ml-100k the test ration is 0.2
      parser.add_argument("--data_valid_ratio", type=float, default=0.1)
      parser.add_argument(
          "--use_one_hot_fea", action="store_true", default=False
      )
      parser.add_argument(
          "--model_activation", type=str, default="leaky"
      )
      parser.add_argument("--gcn_dropout", type=float, default=0.7)
      parser.add_argument(
          "--gcn_agg_norm_symm", type=bool, default=True
      )
      parser.add_argument("--gcn_agg_units", type=int, default=500)
      parser.add_argument("--gcn_agg_accum", type=str, default="sum")
      parser.add_argument("--gcn_out_units", type=int, default=75)
      parser.add_argument("--gen_r_num_basis_func", type=int, default=2)
      parser.add_argument("--train_max_iter", type=int, default=2000)
      parser.add_argument("--train_log_interval", type=int, default=1)
      parser.add_argument("--train_valid_interval", type=int, default=1)
      parser.add_argument("--train_optimizer", type=str, default="adam")
      parser.add_argument("--train_grad_clip", type=float, default=1.0)
      parser.add_argument("--train_lr", type=float, default=0.01)
      parser.add_argument("--train_min_lr", type=float, default=0.001)
      parser.add_argument(
          "--train_lr_decay_factor", type=float, default=0.5
      )
      parser.add_argument(
          "--train_decay_patience", type=int, default=50
      )
      parser.add_argument(
          "--train_early_stopping_patience", type=int, default=100
      )
      parser.add_argument(
          "--share_param", default=False, action="store_true"
      )
  
      args = parser.parse_args()
      args.device = (
          th.device(args.device)
          if args.device >= 0
          else th.device("cpu")
      )
  
      ### configure save_fir to save all the info
      if args.save_dir is None:
          args.save_dir = (
              args.data_name
              + "_"
              + "".join(
                  random.choices(
                      string.ascii_uppercase + string.digits, k=2
                  )
              )
          )
      if args.save_id is None:
          args.save_id = np.random.randint(20)
      args.save_dir = os.path.join("log", args.save_dir)
      if not os.path.isdir(args.save_dir):
          os.makedirs(args.save_dir)
  
      return args
  
file_path: dgl/examples/pytorch/gcmc/train.py
imports: import argparse
  import logging
  import os
  import random
  import string
  import time
  import numpy
  import torch
  import torch.nn
  from data import MovieLens
  from model import BiDecoder, GCMCLayer
  from utils import get_activation, get_optimizer, MetricLogger, torch_net_info, torch_total_param_num
label_desc: Use image node_id 3 for calling a global function with example usage: config() and returns: args