def save_classifications(savedir, classifications, labels):
    """Read and return a list of parameters and samples stored in the result
    files

    Parameters
    ----------
    result_files: list
        list of result files
    classifications: dict
        dictionary of classification probabilities
    """
    import os
    import json
    base_path = os.path.join(savedir, '{}_{}_prior_pe_classification.json')
    for num, i in enumerate(classifications):
        for prior in i.keys():
            with open(base_path.format(labels[num], prior), 'w') as f:
                json.dump(i[prior], f)
