import logging


def log_aucs(**aucs):
    """Log and tabulate AUCs given as nested dictionaries in the format '{model: {label: auc}}'"""
    def dashes(n): return '-' * n

    header = "{:<35} {:<20} {:<15}"
    row = "{:<35} {:<20} {:<15.10f}"
    width = 85
    logging.info(dashes(width))
    for auc_name, auc_value in aucs.items():
        logging.info(header.format('Model', 'Label', auc_name+' AUC'))
        for model, model_value in auc_value.items():
            for label, auc in model_value.items():
                logging.info(row.format(model, label, auc))
        logging.info(dashes(width))