docstr: Node class for splitting
          
code: def __init__(
      self,
      feature: int = None,
      threshold: int = None,
      value=None,
      idxs=None,
      is_root: bool = False,
      left=None,
      impurity_reduction: float = None,
      tree_num: int = None,
      right=None,
      split_or_linear="split",
      n_samples=0,
  ):
      """Node class for splitting"""
  
      # split or linear
      self.is_root = is_root
      self.idxs = idxs
      self.tree_num = tree_num
      self.split_or_linear = split_or_linear
      self.feature = feature
      self.n_samples = n_samples
      self.impurity_reduction = impurity_reduction
  
      # different meanings
      self.value = (
          value  # for split this is mean, for linear this is weight
      )
  
      # split-specific (for linear these should all be None)
      self.threshold = threshold
      self.left = left
      self.right = right
      self.left_temp = None
      self.right_temp = None
  
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 1 to create a new Node object  with example: obj = Node(feature, threshold, value, idxs, is_root, left, impurity_reduction, tree_num, right, split_or_linear, n_samples)