Implementation of a python solution to the k Nearest Neighbors problem