code: def main():
      """
      The main entry of all.
      :return: None
      """
      parser = argparse.ArgumentParser(
          description="Knowledge Graph Embedding for PGL"
      )
      parser.add_argument(
          "--use_cuda", action="store_true", help="use_cuda"
      )
      parser.add_argument(
          "--data_dir",
          dest="data_dir",
          type=str,
          help="the directory of dataset",
          default="./data/WN18/",
      )
      parser.add_argument(
          "--model",
          dest="model",
          type=str,
          help="model to run",
          default="TransE",
      )
      parser.add_argument(
          "--learning_rate",
          dest="learning_rate",
          type=float,
          help="learning rate",
          default=0.001,
      )
      parser.add_argument(
          "--epoch",
          dest="epoch",
          type=int,
          help="epoch to run",
          default=400,
      )
      parser.add_argument(
          "--sample_workers",
          dest="sample_workers",
          type=int,
          help="sample workers",
          default=4,
      )
      parser.add_argument(
          "--batch_size",
          dest="batch_size",
          type=int,
          help="batch size",
          default=1000,
      )
      parser.add_argument(
          "--optimizer",
          dest="optimizer",
          type=str,
          help="optimizer",
          default="adam",
      )
      parser.add_argument(
          "--hidden_size",
          dest="hidden_size",
          type=int,
          help="embedding dimension",
          default=50,
      )
      parser.add_argument(
          "--margin",
          dest="margin",
          type=float,
          help="margin",
          default=4.0,
      )
      parser.add_argument(
          "--checkpoint",
          dest="checkpoint",
          type=str,
          help="directory to save checkpoint directory",
          default="output/",
      )
      parser.add_argument(
          "--evaluate_per_iteration",
          dest="evaluate_per_iteration",
          type=int,
          help="evaluate the training result per x iteration",
          default=50,
      )
      parser.add_argument(
          "--only_evaluate",
          dest="only_evaluate",
          action="store_true",
          help="only do the evaluate program",
          default=False,
      )
      parser.add_argument(
          "--adv_temp_value",
          type=float,
          help="adv_temp_value",
          default=2.0,
      )
      parser.add_argument(
          "--neg_times", type=int, help="neg_times", default=1
      )
      parser.add_argument(
          "--neg_mode",
          type=bool,
          help="return neg mode flag",
          default=False,
      )
  
      parser.add_argument(
          "--nofilter",
          type=bool,
          help="don't filter invalid examples",
          default=False,
      )
      parser.add_argument(
          "--pretrain",
          type=bool,
          help="pretrain for TransR model",
          default=False,
      )
      parser.add_argument(
          "--noeval",
          type=bool,
          help="whether to evaluate the result",
          default=False,
      )
  
      args = parser.parse_args()
      log.info(args)
      train(args)
  
file_path: PGL/legacy/examples/pgl-ke/main.py
imports: import argparse
  import timeit
  import os
  import numpy
  import paddle.fluid
  from data_loader import KGLoader
  from evalutate import Evaluate
  from model import model_dict
  from model.utils import load_var
  from mp_mapper import mp_reader_mapper
  from pgl.utils.logger import log
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types