def METHOD_NAME(dataloader, metric):
    warmup = 5
    iteration = None
    latency_list = []
    if args.benchmark and args.mode == 'performance':
        iteration = args.iters
    for idx, (inputs, labels) in enumerate(dataloader):
        inputs = np.array(inputs)
        input_tensor = tf.constant(inputs, dtype=tf.float32)
        start = time.time()
        predictions = infer(input_tensor)[output_name]
        end = time.time()
        predictions = predictions.numpy()
        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