Given existing Python code with a couple of classes and functions, write another class implementing a new function that extends it.
Asked in the coding stage. Assume the existing RecordProcessor.transform(record) method returns record["amount"]. Implement aggregate_records(records), which uses a subclass and returns a dictionary mapping each category to the sum of transformed amounts.
records is a list of dictionaries, each containing a string category and integer amount. Return a dictionary whose keys are categories and whose values are integer totals. Return {} for an empty list.
def aggregate_records(records):