Writing our own K Nearest Neighbors in Code