code: def test_multi_class_best_ntree_limit():
      base_score = 0.5
      estimator = xgb.XGBClassifier(
          n_estimators=100,
          random_state=1,
          max_depth=1,
          base_score=base_score,
      )
  
      utils.get_classification_model_trainer()(estimator)
  
      estimator.get_booster().best_ntree_limit = 1
  
      assembler = XGBoostModelAssemblerSelector(estimator)
      actual = assembler.assemble()
  
      estimator_class1 = ast.BinNumExpr(
          ast.NumVal(0.5),
          ast.IfExpr(
              ast.CompExpr(
                  ast.FeatureRef(2),
                  ast.NumVal(2.450000047683716),
                  ast.CompOpType.GTE,
              ),
              ast.NumVal(-0.21995015442371368),
              ast.NumVal(0.43024390935897827),
          ),
          ast.BinNumOpType.ADD,
      )
  
      estimator_class2 = ast.BinNumExpr(
          ast.NumVal(0.5),
          ast.IfExpr(
              ast.CompExpr(
                  ast.FeatureRef(2),
                  ast.NumVal(2.450000047683716),
                  ast.CompOpType.GTE,
              ),
              ast.NumVal(0.10324188321828842),
              ast.NumVal(-0.21512198448181152),
          ),
          ast.BinNumOpType.ADD,
      )
  
      estimator_class3 = ast.BinNumExpr(
          ast.NumVal(0.5),
          ast.IfExpr(
              ast.CompExpr(
                  ast.FeatureRef(3),
                  ast.NumVal(1.6500000953674316),
                  ast.CompOpType.GTE,
              ),
              ast.NumVal(0.4029850661754608),
              ast.NumVal(-0.19333337247371674),
          ),
          ast.BinNumOpType.ADD,
      )
  
      expected = ast.SoftmaxExpr(
          [estimator_class1, estimator_class2, estimator_class3]
      )
  
      assert utils.cmp_exprs(actual, expected)
  
file_path: m2cgen/tests/assemblers/test_boosting_xgboost.py
imports: import numpy
  import xgboost
  from m2cgen import ast
  from m2cgen.assemblers import XGBoostModelAssemblerSelector
  from m2cgen.assemblers.utils import apply_op_to_expressions
  from tests import utils
label_desc: Use image node_id 5 for calling a global function with example usage: test_multi_class_best_ntree_limit() without return types