code: def _gini(self, y):
      n = y.size
      return 1.0 - sum(
          (np.sum(y == c) / n) ** 2 for c in range(self.n_classes_)
      )
  
imports: from sklearn.tree._tree import Tree
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
  from sklearn.base import ClassifierMixin, RegressorMixin
  from sklearn import __version__
  from collections import namedtuple
  import pandas
  import numpy
  from collections import namedtuple
  from sklearn import __version__
  from sklearn.base import ClassifierMixin, RegressorMixin
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
  from sklearn.tree._tree import Tree
  import imodels.util.tree
label_desc: Use image node_id 6 for calling the CustomDecisionTreeClassifier obj's underlying member method code with example usage: obj._gini(y) and returns: unknown