code: def test_row_to_tree_assignment_output():
      fr = h2o.import_file(
          path=pyunit_utils.locate("smalldata/prostate/prostate.csv")
      )
      target = "CAPSULE"
      fr[target] = fr[target].asfactor()
  
      gbm = H2OGradientBoostingEstimator(
          ntrees=3, sample_rate=0.6, seed=95
      )
      gbm.train(y=target, training_frame=fr)
  
      row_to_tree_assignment = gbm.row_to_tree_assignment(fr)
  
      print(h2o.ls())
      print()
      print("Frame id", row_to_tree_assignment.frame_id)
  
      print(row_to_tree_assignment)
  
      assert_equals(
          ["row_id", "tree_1", "tree_2", "tree_3"],
          row_to_tree_assignment.names,
      )
      assert_equals(fr.nrows, row_to_tree_assignment.nrows)
  
imports: import os
  import sys
  import h2o
  from tests import pyunit_utils, assert_equals
  from h2o.estimators import H2OGradientBoostingEstimator
label_desc: Use image node_id 1 for calling a global function with example usage: test_row_to_tree_assignment_output() without return types