Forgive me for being simplistic here, but what if we just use JS to turn the screen off, and then use Python for the wait. Make the above script simple, and just turn the screen off, and then, still inside `turn_screen_off` just do a `wait_for_condition` and wait for `is_screen_enabled` to be `False`?