Prototyped KNN_purity callback

2 jobs for master in 21 minutes and 34 seconds (queued for 1 second)