code: def _add_node(
      self,
      parent,
      is_left,
      is_leaf,
      feature,
      threshold,
      impurity,
      n_node_samples,
      weighted_n_node_samples,
      missing_go_to_left,
  ):
      node_id = self.node_count
      if node_id >= self.capacity:
          self._resize_c()
  
      node = Node()
      node.impurity = impurity
      node.n_node_samples = n_node_samples
      node.weighted_n_node_samples = weighted_n_node_samples
  
      if parent != _TREE_UNDEFINED:
          if is_left:
              self.nodes[parent].left_child = node_id
          else:
              self.nodes[parent].right_child = node_id
  
      if is_leaf:
          node.left_child = _TREE_LEAF
          node.right_child = _TREE_LEAF
          node.feature = _TREE_UNDEFINED
          node.threshold = _TREE_UNDEFINED
      else:
          node.feature = feature
          node.threshold = threshold
          node.missing_go_to_left = missing_go_to_left
  
      self.nodes.append(node)
      self.node_count += 1
  
      return node_id
  
file_path: ivy/ivy/functional/frontends/sklearn/tree/_tree.py
imports: import ivy
  from ._splitter import SplitRecord
label_desc: Use image node_id 4 for calling the Tree obj's underlying member method code with example usage: obj._add_node(parent, is_left, is_leaf, feature, threshold, impurity, n_node_samples, weighted_n_node_samples, missing_go_to_left) and returns: node_id