code: def run_round(
      batch_iter,
      program,
      exe,
      fetch_list,
      epoch,
      prefix="train",
      log_per_step=1000,
  ):
      """
      Run the program for one epoch.
      :param batch_iter: the batch_iter of prepared data.
      :param program: the running program, train_program or test program.
      :param exe: the executor of paddle.
      :param fetch_list: the variables to fetch.
      :param epoch: the epoch number of train process.
      :param prefix: the prefix name, type `string`.
      :param log_per_step: log per step.
      :return: None
      """
      batch = 0
      tmp_epoch = 0
      loss = 0
      tmp_loss = 0
      run_time = 0
      data_time = 0
      t2 = timeit.default_timer()
      start_epoch_time = timeit.default_timer()
      for batch_feed_dict in batch_iter():
          batch += 1
          t1 = timeit.default_timer()
          data_time += t1 - t2
          batch_fetch = exe.run(
              program, fetch_list=fetch_list, feed=batch_feed_dict
          )
          if prefix == "train":
              loss += batch_fetch[0]
              tmp_loss += batch_fetch[0]
          if batch % log_per_step == 0:
              tmp_epoch += 1
              if prefix == "train":
                  log.info(
                      "Epoch %s (%.7f sec) Train Loss: %.7f"
                      % (
                          epoch + tmp_epoch,
                          timeit.default_timer() - start_epoch_time,
                          tmp_loss[0] / batch,
                      )
                  )
                  start_epoch_time = timeit.default_timer()
              else:
                  log.info("Batch %s" % batch)
              batch = 0
              tmp_loss = 0
  
          t2 = timeit.default_timer()
          run_time += t2 - t1
  
      if prefix == "train":
          log.info(
              "GPU run time {}, Data prepare extra time {}".format(
                  run_time, data_time
              )
          )
          log.info(
              "Epoch %s \t All Loss %s" % (epoch + tmp_epoch, loss)
          )
  
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 1 for calling a global function with example usage: run_round(batch_iter, program, exe, fetch_list, epoch, prefix, log_per_step) without return types