knn algorithm in python from scratch