in modules/python/csi/csi.py [0:0]
def monitor_thresholds(description, monitor_function, thresholds, comparison, start_time, log_file):
"""Monitor thresholds and log their completion."""
for target, threshold_desc in thresholds:
wait_for_condition(monitor_function, target, comparison)
log_duration(f"{description} {threshold_desc}", start_time, log_file)