code: def main():
      args = arg_parse()
      # see test-tube
      # args = hyp_search.hyp_arg_parse()
  
      if not os.path.exists(os.path.dirname(args.model_path)):
          os.makedirs(os.path.dirname(args.model_path))
  
      print("Starting {} workers".format(args.n_workers))
      print("Using dataset {}".format(args.dataset))
  
      record_keys = [
          "conv_type",
          "n_layers",
          "hidden_dim",
          "margin",
          "dataset",
          "dataset_type",
          "max_graph_size",
          "skip",
      ]
      args_str = ".".join(
          [
              "{}={}".format(k, v)
              for k, v in sorted(vars(args).items())
              if k in record_keys
          ]
      )
      logger = SummaryWriter("log/" + args_str)
  
      model = build_model(args)
  
      data_source = data.DataSource(args.dataset)
      opt = optim.Adam(model.parameters(), args.lr)
  
      if args.test:
          validation(
              args, model, data_source, logger, 0, make_pr_curve=True
          )
      else:
          batch_n = 0
          for epoch in range(args.n_batches // args.eval_interval):
              print("Epoch", epoch)
              train_epoch(args, model, data_source, opt)
              validation(args, model, data_source, logger, batch_n)
              if not args.test:
                  print("Saving {}".format(args.model_path))
                  torch.save(model.state_dict(), args.model_path)
  
imports: import argparse
  from collections import defaultdict
  from itertools import permutations
  import pickle
  from queue import PriorityQueue
  import os
  import random
  import time
  from deepsnap.batch import Batch
  import networkx
  import numpy
  from sklearn.manifold import TSNE
  from sklearn.metrics import roc_auc_score, confusion_matrix
  from sklearn.metrics import precision_recall_curve
  import torch
  import torch.nn
  import torch.multiprocessing
  import torch.nn.functional
  import torch.optim
  from torch.utils.tensorboard import SummaryWriter
  from torch_geometric.data import DataLoader
  from torch_geometric.datasets import TUDataset
  import torch_geometric.utils
  import torch_geometric.nn
  import data
  import models
  import utils
label_desc: Use image node_id 5 for calling a global function with example usage: main() without return types