code: def run_epoch(exe, data, program, stage, epoch, loss, acc):
      """
      The epoch funtcion to run each epoch.
      """
      print("start {} epoch of {}".format(stage, epoch))
      all_loss = 0.0
      all_acc = 0.0
      all_samples = 0.0
      count = 0
      for datas, labels in construct_feed_data(data):
          batch_loss, batch_acc = exe.run(
              program,
              fetch_list=[loss, acc],
              feed={"emb_x": datas, "label_y": labels},
          )
          len_samples = len(datas)
          all_loss = batch_loss * len_samples
          all_acc = batch_acc * len_samples
          all_samples += len_samples
          count += 1
      print(
          "pass:{}, epoch:{}, loss:{}, acc:{}".format(
              stage, epoch, batch_loss, all_acc / (len_samples)
          )
      )
  
imports: import numpy
  import paddle
  import paddle.fluid
label_desc: Use image node_id 3 for calling a global function with example usage: run_epoch(exe, data, program, stage, epoch, loss, acc) without return types