def evaluate(test_step, metric, test_dist_dataset):
    """Runs evaluation steps and aggregate metrics"""
    for x in test_dist_dataset:
        labels, outputs = test_step(x)
        metric.update_state(labels, outputs)

    return metric.result()