code: def main(args):
      import logging
  
      log.setLevel(logging.DEBUG)
      log.info("start")
  
      num_devices = len(F.cuda_places())
      model = DeepwalkModel(
          args.num_nodes,
          args.hidden_size,
          args.neg_num,
          False,
          False,
          1.0,
      )
      pyreader = model.pyreader
      loss = model.forward()
  
      train_steps = int(
          args.num_nodes * args.epoch / args.batch_size / num_devices
      )
      optimization(
          args.lr * num_devices, loss, train_steps, args.optimizer
      )
  
      place = F.CUDAPlace(0)
      exe = F.Executor(place)
      exe.run(F.default_startup_program())
  
      graph = build_graph(args.num_nodes, args.edge_path)
      gen_func = build_gen_func(args, graph)
  
      pyreader.decorate_tensor_provider(gen_func)
      pyreader.start()
  
      train_prog = F.default_main_program()
  
      if args.warm_start_from_dir is not None:
          F.io.load_params(exe, args.warm_start_from_dir, train_prog)
  
      train_exe = get_parallel_exe(train_prog, loss)
      train(
          train_exe, exe, train_prog, loss, pyreader, args, train_steps
      )
  
file_path: PGL/legacy/examples/distribute_deepwalk/gpu_train.py
imports: import argparse
  import time
  import os
  import numpy
  import paddle.fluid
  import paddle.fluid.layers
  from pgl.utils.logger import log
  from model import DeepwalkModel
  from utils import build_graph
  from utils import build_gen_func
label_desc: Use image node_id 4 for calling a global function with example usage: main(args) without return types