code: def test_reader(config, device, logger):
      loader = build_dataloader(config, "Train", device, logger)
      import time
  
      starttime = time.time()
      count = 0
      try:
          for data in loader():
              count += 1
              if count % 1 == 0:
                  batch_time = time.time() - starttime
                  starttime = time.time()
                  logger.info(
                      "reader: {}, {}, {}".format(
                          count, len(data[0]), batch_time
                      )
                  )
      except Exception as e:
          logger.info(e)
      logger.info("finish reader: {}, Success!".format(count))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import sys
  import yaml
  import paddle
  import paddle.distributed
  from ppocr.data import build_dataloader, set_signal_handlers
  from ppocr.modeling.architectures import build_model
  from ppocr.losses import build_loss
  from ppocr.optimizer import build_optimizer
  from ppocr.postprocess import build_post_process
  from ppocr.metrics import build_metric
  from ppocr.utils.save_load import load_model
  from ppocr.utils.utility import set_seed
  from ppocr.modeling.architectures import apply_to_static
  import tools.program
label_desc: Use image node_id 2 for calling a global function with example usage: test_reader(config, device, logger) without return types