Write a Python script to efficiently parse and clean a massive, noisy CSV file generated by an industrial sensor for Ametek.
Implement clean_sensor_csv(lines), where lines is an iterable of CSV text lines whose first nonblank line is the header timestamp,sensor_id,value,status. Return a list of dictionaries with stripped timestamp, stripped sensor_id, finite floating-point value, and uppercase status. Ignore blank lines, malformed CSV rows, rows with anything other than four fields, missing required fields, invalid numbers, and nonfinite values.
Example: ['timestamp,sensor_id,value,status ', '2026-01-01T00:00:00Z, S-17, 21.5, ok '] returns [{'timestamp': '2026-01-01T00:00:00Z', 'sensor_id': 'S-17', 'value': 21.5, 'status': 'OK'}]. Process the input in one pass using standard-library Python tools.
lines is an iterable of strings.timestamp,sensor_id,value,status.def clean_sensor_csv(lines):