Write a function that deduplicates a list of records based on a specific attribute.
Each record is a dictionary, and the selected attribute exists in every record with a hashable value. Return a new list containing the first record for each distinct attribute value, preserving input order.
Function signature: def deduplicate_records(records, attribute):
records is a list of dictionaries, and attribute is a string. The output is a list of dictionaries.
def deduplicate_records(records, attribute):