Interpret data fields within a CO-TRACER contributions report.

    Interpret the contribution amount, contribution date, filed date, amended,
    and amendment fields of the provided entry. All dates (contribution and
    filed) are interpreted together and, if any fails, all will retain their
    original value. Likewise, amended and amendment are interpreted together and
    if one is malformed, both will retain their original value. Entry may be
    edited in place and side-effects are possible in coupled code. However,
    client code should use the return value to guard against future changes.

    A value with the key 'AmountsInterpreted' will be set to True or False in
    the returned entry if floating point values are successfully interpreted
    (ContributionAmount) or not respectively.

    A value with the key 'DatesInterpreted' will be set to True or False in
    the returned entry if ISO 8601 strings are successfully interpreted
    (ContributionDate and FiledDate) or not respectively.

    A value with the key 'BooleanFieldsInterpreted' will be set to True or
    False in the returned entry if boolean strings are successfully interpreted
    (Amended and Amendment) or not respectively.

    @param entry: The contribution report data to manipulate / interpret.
    @type entry: dict
    @return: The entry passed 
    @raise ValueError: Raised if any expected field cannot be found in entry.

def interpret_contribution_entry(entry):
    """Interpret data fields within a CO-TRACER contributions report.

    Interpret the contribution amount, contribution date, filed date, amended,
    and amendment fields of the provided entry. All dates (contribution and
    filed) are interpreted together and, if any fails, all will retain their
    original value. Likewise, amended and amendment are interpreted together and
    if one is malformed, both will retain their original value. Entry may be
    edited in place and side-effects are possible in coupled code. However,
    client code should use the return value to guard against future changes.

    A value with the key 'AmountsInterpreted' will be set to True or False in
    the returned entry if floating point values are successfully interpreted
    (ContributionAmount) or not respectively.

    A value with the key 'DatesInterpreted' will be set to True or False in
    the returned entry if ISO 8601 strings are successfully interpreted
    (ContributionDate and FiledDate) or not respectively.

    A value with the key 'BooleanFieldsInterpreted' will be set to True or
    False in the returned entry if boolean strings are successfully interpreted
    (Amended and Amendment) or not respectively.

    @param entry: The contribution report data to manipulate / interpret.
    @type entry: dict
    @return: The entry passed 
    @raise ValueError: Raised if any expected field cannot be found in entry.
    """
    try:
        new_contribution_amount = float(entry['ContributionAmount'])
        entry['AmountsInterpreted'] = True
        entry['ContributionAmount'] = new_contribution_amount
    except ValueError:
        entry['AmountsInterpreted'] = False
    except TypeError:
        entry['AmountsInterpreted'] = False
    except AttributeError:
        entry['AmountsInterpreted'] = False

    try:
        contribution_date = parse_iso_str(entry['ContributionDate'])
        filed_date = parse_iso_str(entry['FiledDate'])
        entry['DatesInterpreted'] = True
        entry['ContributionDate'] = contribution_date
        entry['FiledDate'] = filed_date
    except ValueError:
        entry['DatesInterpreted'] = False
    except TypeError:
        entry['DatesInterpreted'] = False
    except AttributeError:
        entry['DatesInterpreted'] = False

    try: 
        amended = parse_yes_no_str(entry['Amended'])
        amendment = parse_yes_no_str(entry['Amendment'])
        entry['BooleanFieldsInterpreted'] = True
        entry['Amended'] = amended
        entry['Amendment'] = amendment
    except ValueError:
        entry['BooleanFieldsInterpreted'] = False
    except TypeError:
        entry['BooleanFieldsInterpreted'] = False
    except AttributeError:
        entry['BooleanFieldsInterpreted'] = False

    return entry