Updated test_predict to use sklearn samples_generator