Simple implementation of a decision tree in python