code: def update_values(self, X, y):
      self.value = y.mean()
      if self.threshold is not None:
          right_indicator = np.apply_along_axis(
              lambda x: x[self.feature] > self.threshold, 1, X
          )
          X_right = X[right_indicator, :]
          X_left = X[~right_indicator, :]
          y_right = y[right_indicator]
          y_left = y[~right_indicator]
          if self.left is not None:
              self.left.update_values(X_left, y_left)
          if self.right is not None:
              self.right.update_values(X_right, y_right)
  
imports: from copy import deepcopy
  import numpy
  from matplotlib import pyplot
  from sklearn import datasets
  from sklearn import tree
  from sklearn.base import BaseEstimator
  from sklearn.linear_model import RidgeCV, RidgeClassifierCV
  from sklearn.model_selection import train_test_split
  from sklearn.tree import plot_tree
  from sklearn.utils import check_X_y
  from imodels.tree.viz_utils import extract_sklearn_tree_from_figs
label_desc: Use image node_id 2 for calling the Node obj's underlying member method code with example usage: obj.update_values(X, y) without return types