code: def test_terminal_xgboost_nodes():
      df = h2o.import_file(
          pyunit_utils.locate(
              "smalldata/demos/bank-additional-full.csv"
          )
      )
  
      xgboost = H2OXGBoostEstimator(max_depth=1, ntrees=1)
      model = xgboost.train(y="y", training_frame=df)
      tree = H2OTree(xgboost, 0)
      assert len(tree.node_ids) == 3
  
      # tree.descriptions is deprecated
      # Depth is 1 - last two nodes should be described as terminal
      assert "terminal node" in tree.descriptions[1]
      assert "terminal node" in tree.descriptions[2]
  
      # Prediction is part of the description for terminal nodes
      assert "Prediction: " in tree.descriptions[1]
      assert "Prediction: " in tree.descriptions[2]
  
imports: import h2o
  import os, sys
  from h2o.tree import H2OTree
  from h2o.estimators import H2OXGBoostEstimator
  from tests import pyunit_utils
label_desc: Use image node_id 1 for calling a global function with example usage: test_terminal_xgboost_nodes() without return types