How does pytest assertion rewriting handle function calls like all() and any()?