Write apply_contract(record, contract). The contract is a list of
{"name", "default"} dicts. Return a dict mapping each contract
feature to the record's value, or the contract's default when the
feature is missing — keeping contract order.
Write apply_contract(record, contract). The contract is a list of
{"name", "default"} dicts. Return a dict mapping each contract
feature to the record's value, or the contract's default when the
feature is missing — keeping contract order.