"""Interruption-related helpers extracted from the duplex pipeline.""" from __future__ import annotations def should_interrupt(min_duration_ms: int, detected_ms: int) -> bool: """Decide whether interruption conditions are met.""" return int(detected_ms) >= max(0, int(min_duration_ms))