import numpy as np def gini_impurity(labels): raise NotImplementedError def split_impurity(x, y, threshold): raise NotImplementedError def best_threshold(x, y): raise NotImplementedError def best_split(X, y): raise NotImplementedError