Infineon AURIX controllers can report repeated diagnostic fault codes. Implement a small object-oriented fault monitor that stores counts for each code and processes commands through a class instance.
Define an AURIXFaultMonitor class with these methods:
record_fault(code): Increment the count for code.clear_fault(code): Remove the stored count for code. Clearing an unknown code has no effect.get_count(code): Return the current count for code, or 0 if it has not been recorded.Implement process_fault_operations(operations). It must create one AURIXFaultMonitor object, execute every operation in order by calling the appropriate method, and return the results of all count operations.
Each operation is a two-element list: ['record', code], ['clear', code], or ['count', code]. The input is a list of operations, and the output is a list of integers.
def process_fault_operations(operations):