code: def main(args):
      """main"""
      import logging
  
      log.setLevel(logging.DEBUG)
      log.info("start")
  
      if args.dataset is not None:
          if args.dataset == "BlogCatalog":
              graph = data_loader.BlogCatalogDataset().graph
          else:
              raise ValueError(args.dataset + " dataset doesn't exists")
          log.info("Load buildin BlogCatalog dataset done.")
          node_feat = (
              np.expand_dims(graph.node_feat["group_id"].argmax(-1), -1)
              + graph.num_nodes
          )
          args.num_nodes = graph.num_nodes
          args.num_embedding = (
              graph.num_nodes + graph.node_feat["group_id"].shape[-1]
          )
      else:
          graph = build_graph(
              args.num_nodes, args.edge_path, args.output_path
          )
          node_feat = np.load(args.node_feat_npy)
  
      model = GESModel(
          args.num_embedding,
          node_feat.shape[1] + 1,
          args.hidden_size,
          args.neg_num,
          False,
          2,
      )
      pyreader = model.pyreader
      loss = model.forward()
      num_devices = len(F.cuda_places())
  
      train_steps = int(
          args.num_nodes * args.epoch / args.batch_size / num_devices
      )
      log.info("Train steps: %s" % train_steps)
      optimization(
          args.lr * num_devices, loss, train_steps, args.optimizer
      )
  
      place = F.CUDAPlace(0)
      exe = F.Executor(place)
      exe.run(F.default_startup_program())
  
      gen_func = build_gen_func(args, graph, node_feat)
  
      pyreader.decorate_tensor_provider(gen_func)
      pyreader.start()
      train_prog = F.default_main_program()
      train_exe = get_parallel_exe(train_prog, loss)
      train(
          train_exe, exe, train_prog, loss, pyreader, args, train_steps
      )
  
imports: import argparse
  import time
  import os
  import glob
  import numpy
  import paddle.fluid
  import paddle.fluid.layers
  from pgl.utils.logger import log
  from pgl.graph import Graph
  from pgl.sample import graph_alias_sample_table
  from pgl import data_loader
  import mp_reader
  from reader import GESReader
  from model import GESModel
label_desc: Use image node_id 8 for calling a global function with example usage: main(args) without return types