code: def main():
      args = arg_parse()
  
      name = "BioSNAP-FF"
      f = "minerff.tsv"
      f2 = "minerf.tsv"
      d = readFilePD(f, ["relation"])
      d2 = readFilePD(f2, ["namespace"])
      nxg = pdToNx3(
          d, d2, "GO_id0", "GO_id2", "relation", "GO_id1", "namespace"
      )
      dg = Graph(nxg)
      graphs = [dg]
  
      # the input that we assume users have
      edge_train_mode = args.mode
      print("edge train mode: {}".format(edge_train_mode))
  
      # graphs = GraphDataset(graphs)
      if args.multigraph:
          graphs = [copy.deepcopy(graphs[0]) for _ in range(10)]
  
      dataset = GraphDataset(
          graphs,
          task="link_pred",
          edge_message_ratio=args.edge_message_ratio,
          edge_train_mode=edge_train_mode,
      )
      print("Initial dataset: {}".format(dataset))
  
      # split dataset
      datasets = {}
      (
          datasets["train"],
          datasets["val"],
          datasets["test"],
      ) = dataset.split(
          transductive=not args.multigraph,
          split_ratio=[0.85, 0.05, 0.1],
      )
  
      print("after split")
      print(
          "Train message-passing graph: {} nodes; {} edges.".format(
              datasets["train"][0].G.number_of_nodes(),
              datasets["train"][0].G.number_of_edges(),
          )
      )
      print(
          "Val message-passing graph: {} nodes; {} edges.".format(
              datasets["val"][0].G.number_of_nodes(),
              datasets["val"][0].G.number_of_edges(),
          )
      )
      print(
          "Test message-passing graph: {} nodes; {} edges.".format(
              datasets["test"][0].G.number_of_nodes(),
              datasets["test"][0].G.number_of_edges(),
          )
      )
  
      # node feature dimension
      input_dim = 47410  # datasets['train'].num_node_features
      # link prediction needs 2 classes (0, 1)
      num_classes = datasets["train"].num_edge_labels
      # print('num_edge_labels',datasets['train'].num_edge_labels)
  
      model = Net(input_dim, num_classes, args).to(args.device)
      # optimizer = torch.optim.Adam(model.parameters(), lr=0.001, weight_decay=5e-3)
      optimizer = torch.optim.SGD(
          model.parameters(), lr=0.1, momentum=0.9, weight_decay=5e-4
      )
      scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(
          optimizer, T_max=args.epochs
      )
      follow_batch = []  # e.g., follow_batch = ['edge_index']
  
      dataloaders = {
          split: DataLoader(
              ds,
              collate_fn=Batch.collate(follow_batch),
              batch_size=args.batch_size,
              shuffle=(split == "train"),
          )
          for split, ds in datasets.items()
      }
      print("Graphs after split: ")
      for key, dataloader in dataloaders.items():
          for batch in dataloader:
              print(key, ": ", batch)
  
      train(model, dataloaders, optimizer, args, scheduler=scheduler)
  
imports: import sys
  import argparse
  from converter import *
  import copy
  import math
  import time
  import numpy
  from sklearn.metrics import *
  import torch
  import torch.nn.functional
  from torch.utils.data import DataLoader
  from torch_geometric.datasets import Planetoid
  from torch_geometric.datasets import TUDataset
  import torch_geometric.transforms
  import torch_geometric.nn
  from deepsnap.graph import Graph
  from deepsnap.dataset import GraphDataset
  from deepsnap.batch import Batch
  import pdb
label_desc: Use image node_id 4 for calling a global function with example usage: main() without return types