code: def test_with_dataloader(
      exe,
      compiled_test_prog,
      test_dataloader,
      test_fetch_list,
      test_metrics,
      log_interval=0,
      save_model_name="",
  ):
      if not test_dataloader:
          logger.error("[TEST] get dataloader failed.")
      test_metrics.reset()
      test_iter = 0
  
      for data in test_dataloader():
          test_outs = exe.run(
              compiled_test_prog, fetch_list=test_fetch_list, feed=data
          )
          test_metrics.accumulate(test_outs)
          if log_interval > 0 and test_iter % log_interval == 0:
              test_metrics.calculate_and_log_out(
                  test_outs,
                  info="[TEST] test_iter {} ".format(test_iter),
              )
          test_iter += 1
      test_metrics.finalize_and_log_out("[TEST] Finish")
  
file_path: PaddleHub/modules/video/classification/videotag_tsn_lstm/resource/utils/train_utils.py
imports: import os
  import sys
  import logging
  import time
  import numpy
  import paddle.fluid
  from paddle.fluid import profiler
label_desc: Use image node_id 2 for calling a global function with example usage: test_with_dataloader(exe, compiled_test_prog, test_dataloader, test_fetch_list, test_metrics, log_interval, save_model_name) without return types