This adds a new utils function that is a slight generalisation of `wait_for` with an additional condition that must always be met while waiting. `wait_for` now calls this new function with the condition being one that is always true.