def _aggregate_score_dicts(scores , name = None):
    """ Aggregate a list of dict to a dict of lists.
        
    Parameters
    ----------
    scores : list of dictionaries
        Contains a dictionary of scores for each fold.
        
    name : str, optional
        Prefix for the keys. The default is None.

    Returns
    -------
    dict of lists
    
    Example
    -------      
    
    scores = [{'roc_auc' : 0.78 , 'accuracy' : 0.8} , {'roc_auc' : 0.675 , 'accuracy' : 0.56} , {'roc_auc' : 0.8 , 'accuracy' : 0.72 }]
    
    _aggregate_score_dicts(scores) = {'roc_auc' : [0.78 , 0.675 , 0.8] , 'accuracy' : [0.8 , 0.56 , 0.72]}
    
    """
    if name is None :
        return {key: [score[key] for score in scores] for key in scores[0]}
    else : 
        return {name + str('_') + key: [score[key] for score in scores] for key in scores[0]}