def METHOD_NAME(model, epoch, output_predictions=False):
    print_rank_last('calculating metrics ...')
    correct = 0
    total = 0
    if output_predictions:
        assert mpu.get_data_parallel_world_size() == 1
        named_predictions = []
        names = 'predictions'
    for name, dataloader in dataloaders:
        output = calculate_correct_answers(name, model, dataloader,
                                           epoch, output_predictions)
        if not output_predictions:
            correct_ans, total_count = output
        else:
            correct_ans, total_count, predictions = output
            named_predictions.append((name, predictions))
            names += '_' + name
        correct += correct_ans
        total += total_count
    if is_last_rank():
        percent = float(correct) * 100.0 / float(total)
        print(' >> |epoch: {}| overall: correct / total = {} / {} = '
              '{:.4f} %'.format(epoch, correct, total, percent))
    if output_predictions and is_last_rank():
        assert args.load is not None
        filename = os.path.join(args.load, names + '.pt')
        torch.save(named_predictions, filename)