Python metric learning code issue | Hacker News Reader