code: def train(
      train_exe,
      exe,
      program,
      loss,
      node2vec_pyreader,
      args,
      train_steps,
  ):
      """train"""
      trainer_id = int(os.getenv("PADDLE_TRAINER_ID", "0"))
      step = 0
      while True:
          try:
              begin_time = time.time()
              (loss_val,) = train_exe.run(fetch_list=[loss])
              log.info(
                  "step %s: loss %.5f speed: %.5f s/step"
                  % (step, np.mean(loss_val), time.time() - begin_time)
              )
              step += 1
          except F.core.EOFException:
              node2vec_pyreader.reset()
  
          if (
              step % args.steps_per_save == 0 or step == train_steps
          ) and trainer_id == 0:
              model_save_dir = args.output_path
              model_path = os.path.join(model_save_dir, str(step))
              if not os.path.exists(model_save_dir):
                  os.makedirs(model_save_dir)
              F.io.save_params(exe, model_path, program)
  
          if step == train_steps:
              break
  
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 6 for calling a global function with example usage: train(train_exe, exe, program, loss, node2vec_pyreader, args, train_steps) without return types