Add helper_metadata option to ImTester.check_state()