Why create this sub-function, test_handler(), instead of just doing what it does inside the test itself?