Netflix Interview Question

Code the decision tree from scratch with Gini index.