def select_supporting_facts(scored_sfs, min_thresholds):
    """
    select supporting facts according to the provided thresholds
    :param scored_sfs: a list of (sentence_id, score)
    :param min_thresholds: a list of minimum scores for top ranked supporting facts:
           [min_score_for_top_ranked, min_score_for_second_ranked, min_score_for_others]
    :return: a list of sentence ids predicted as supporting facts
    """
    if isinstance(scored_sfs, dict):
        scored_sfs = [(sf, score) for sf, score in scored_sfs.items()]
    scored_sfs.sort(key=lambda tup: tup[1], reverse=True)
    sfs = []
    for r, sf_score in enumerate(scored_sfs):
        sf, score = sf_score
        thresh = min_thresholds[min(r, len(min_thresholds)-1)]
        if score >= thresh:
            sfs.append(sf)
    return sfs