Interview Guides

Given a list of record dictionaries records, a list of field names key_fields that form a composite key, and a field name timestamp_field, return a new list with duplicate records removed. Records are duplicates if all values in key_fields match. For each composite key, keep only the record with the largest value in timestamp_field.
1 <= len(records) <= 10^5key_fields and timestamp_field1 <= len(key_fields) <= 5>