def keys_are_equal(rec1, rec2, fkeys):
    """Check if the "keys" in two records are equal. The key fields
    are all fields for which order isn't marked ignore.

    Parameters
    -------------------------------------------------------------------------
    rec1  - The first record
    rec2 - The second record
    fkeys - A list of the fields to compare
    """

    for f in fkeys:
        if not(rec1[f] == rec2[f]):
            return False

    return True