class_docstr: Tree class used for predictions.
  
  Parameters
  ----------
  nodes : ndarray of PREDICTOR_RECORD_DTYPE
      The nodes of the tree.
  binned_left_cat_bitsets : ndarray of shape (n_categorical_splits, 8), dtype=uint32
      Array of bitsets for binned categories used in predict_binned when a
      split is categorical.
  raw_left_cat_bitsets : ndarray of shape (n_categorical_splits, 8), dtype=uint32
      Array of bitsets for raw categories used in predict when a split is
      categorical.
class_docstr_tok: ["Tree","class","used","for","predictions",".","Parameters","--","--","--","--","--","nodes",":","ndarray","of","PREDICTOR_RECORD_DTYPE","The","nodes","of","the","tree",".","binned_left_cat_bitsets",":","ndarray","of","shape","(","n_categorical_splits",",","8",")",",","dtype=uint32","Array","of","bitsets","for","binned","categories","used","in","predict_binned","when","a","split","is","categorical",".","raw_left_cat_bitsets",":","ndarray","of","shape","(","n_categorical_splits",",","8",")",",","dtype=uint32","Array","of","bitsets","for","raw","categories","used","in","predict","when","a","split","is","categorical","."]
docstr: Return number of leaves.
docstr_tok: ["Return","number","of","leaves","."]
code: def get_n_leaf_nodes(self):
      """Return number of leaves."""
      return int(self.nodes["is_leaf"].sum())
  
file_path: scikit-learn/sklearn/ensemble/_hist_gradient_boosting/predictor.py
imports: import numpy
  from ._predictor import _compute_partial_dependence, _predict_from_binned_data, _predict_from_raw_data
  from .common import PREDICTOR_RECORD_DTYPE, Y_DTYPE
label_desc: Use image node_id 2 for calling the TreePredictor obj's underlying member method code with example usage: obj.get_n_leaf_nodes() and returns: int