def get_highest_scoring_ids(ids_set, id2sc_dic,
                            scfp_list=False):
    """
    Given a set of IDs, and a ID to score mapping, return highest
    scoring ID(s) in list.

    scfp_list:
        If score is stored in first position of list, with ID
        mapping to list in id2sc_dic.

    >>> ids_set = ['s1', 's2', 's3',  's4']
    >>> id2sc_dic = {'s1' : 10, 's2' : 5, 's3' : 10, 's4' : 7}
    >>> get_highest_scoring_ids(ids_set, id2sc_dic)
    ['s1', 's3']
    >>> id2sc_dic = {'s1' : 10, 's2' : 5, 's3' : 10, 's4' : 17}
    >>> get_highest_scoring_ids(ids_set, id2sc_dic)
    ['s4']
    >>> ids_set = ['s1', 's2', 's3']
    >>> id2sc_dic = {'s1' : 0, 's2' : 0, 's3' : 0}
    >>> get_highest_scoring_ids(ids_set, id2sc_dic)
    ['s1', 's2', 's3']

    """
    max_ids = []
    max_sc = -6666
    for set_id in ids_set:
        if scfp_list:
            if max_sc < id2sc_dic[set_id][0]:
                max_sc = id2sc_dic[set_id][0]
        else:
            if max_sc < id2sc_dic[set_id]:
                max_sc = id2sc_dic[set_id]
    for set_id in ids_set:
        if scfp_list:
            if id2sc_dic[set_id][0] == max_sc:
                max_ids.append(set_id)
        else:
            if id2sc_dic[set_id] == max_sc:
                max_ids.append(set_id)
    assert max_ids, "max_ids empty"
    max_ids = list(set(max_ids))
    max_ids.sort()
    return max_ids