Implement Knn From Scratch Python