add basic implementation of drained state to wait_for module