Write a clean, testable function to filter and sort a list of device logs by timestamp and severity level under tight memory constraints.
Implement def filter_sort_logs(logs, min_severity):. Each log is a dictionary with integer timestamp and severity fields, where severity ranges from 1 to 5. Keep logs whose severity is at least min_severity, sort by ascending timestamp, then by descending severity for equal timestamps, and modify and return the original list. Use O(1) auxiliary space.
def filter_sort_logs(logs, min_severity):