class_docstr: A node in a binary tree.
  Pointers to left and right children are in :left: and :right: attributes.
class_docstr_tok: ["A","node","in","a","binary","tree",".","Pointers","to","left","and","right","children","are","in",":","left",":","and",":","right",":","attributes","."]
code: def __init__(
      self,
      id,  # type: int
      is_leaf,  # type: bool
      value,
      value_ratio,
      impurity,  # type: float
      samples,  # type: int
      sample_ratio,  # type: float
      feature_name=None,  # type: str
      feature_id=None,  # type: int
      threshold=None,  # type: float
      left=None,  # type: NodeInfo
      right=None,  # type: NodeInfo
  ):
      # type: (...) -> None
      self.id = id
      self.is_leaf = is_leaf
      self.value = value
      self.value_ratio = value_ratio
      self.impurity = impurity
      self.samples = samples
      self.sample_ratio = sample_ratio
      self.feature_name = feature_name
      self.feature_id = feature_id
      self.threshold = threshold
      self.left = left
      self.right = right
  
imports: from typing import Any, List, Tuple, Union, Optional
  import numpy
  from .base_utils import attrs
  from .formatters.features import FormattedFeatureName
label_desc: Use image node_id 1 to create a new NodeInfo object from inherited base classes: object with example: obj = NodeInfo(id, is_leaf, value, value_ratio, impurity, samples, sample_ratio, feature_name, feature_id, threshold, left, right)