Python Decision Tree Code