code: def compute_time_loader(data_loader):
      """Computes loader time."""
      timer = Timer()
      if cfg.DATA_LOADER.MODE != loader.FFCV:
          loader.shuffle(data_loader, 0)
      data_loader_iterator = iter(data_loader)
      total_iter = cfg.PREC_TIME.NUM_ITER + cfg.PREC_TIME.WARMUP_ITER
      total_iter = min(total_iter, len(data_loader))
      for cur_iter in range(total_iter):
          if cur_iter == cfg.PREC_TIME.WARMUP_ITER:
              timer.reset()
          timer.tic()
          next(data_loader_iterator)
          timer.toc()
      return timer.average_time
  
file_path: pycls/pycls/core/benchmark.py
imports: import pycls.core.logging
  import pycls.core.net
  import pycls.datasets.loader
  import torch
  import torch.cuda.amp
  from pycls.core.config import cfg
  from pycls.core.timer import Timer
label_desc: Use image node_id 3 for calling a global function with example usage: compute_time_loader(data_loader) and returns: timer