implement the generate_testing_values as local closure for better
performance