def select_id_from_scores_dic(id1, id2, sc_dic,
                              get_worse=False,
                              rev_filter=False):
    """
    Based on ID to score mapping, return better (or worse) scoring ID.

    >>> id1 = "id1"
    >>> id2 = "id2"
    >>> id3 = "id3"
    >>> sc_dic = {'id1' : 5, 'id2': 3, 'id3': 3}
    >>> select_id_from_scores_dic(id1, id2, sc_dic)
    'id1'
    >>> select_id_from_scores_dic(id1, id2, sc_dic, get_worse=True)
    'id2'
    >>> select_id_from_scores_dic(id1, id2, sc_dic, rev_filter=True, get_worse=True)
    'id1'
    >>> select_id_from_scores_dic(id1, id2, sc_dic, rev_filter=True)
    'id2'
    >>> select_id_from_scores_dic(id2, id3, sc_dic)
    False

    """

    sc_id1 = sc_dic[id1]
    sc_id2 = sc_dic[id2]
    if sc_id1 > sc_id2:
        if rev_filter:
            if get_worse:
                return id1
            else:
                return id2
        else:
            if get_worse:
                return id2
            else:
                return id1
    elif sc_id1 < sc_id2:
        if rev_filter:
            if get_worse:
                return id2
            else:
                return id1
        else:
            if get_worse:
                return id1
            else:
                return id2
    else:
        return False