def METHOD_NAME(dataloader, metric):
    warmup = 5
    iteration = None
    latency_list = []
    if FLAGS.benchmark and FLAGS.mode == 'performance':
        iteration = FLAGS.iters
    for idx, (inputs, labels) in enumerate(dataloader):
        start = time.time()
        predictions = model.predict_on_batch(inputs)
        end = time.time()
        predictions, labels = postprocess((predictions, labels))
        metric.update(predictions, labels)
        latency_list.append(end - start)
        if iteration and idx >= iteration:
            break
    latency = np.array(latency_list[warmup:]).mean() / eval_dataloader.batch_size
    return latency