Python utility library for waiting for predicates