LinkedIn interview question

Code up the knn algorithm in python.