code: def test_linear_model():
      # Default updater ("shotgun") is nondeterministic
      estimator = xgb.XGBRegressor(
          n_estimators=2,
          random_state=1,
          updater="coord_descent",
          feature_selector="shuffle",
          booster="gblinear",
      )
      utils.get_regression_model_trainer()(estimator)
  
      assembler = XGBoostModelAssemblerSelector(estimator)
      actual = assembler.assemble()
  
      feature_weight_mul = [
          ast.BinNumExpr(
              ast.FeatureRef(0),
              ast.NumVal(-0.168701),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(1),
              ast.NumVal(0.0759076),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(2),
              ast.NumVal(-0.0433617),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(3),
              ast.NumVal(5.57671),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(4),
              ast.NumVal(1.48913),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(5),
              ast.NumVal(0.245112),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(6),
              ast.NumVal(0.00765347),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(7),
              ast.NumVal(0.366748),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(8),
              ast.NumVal(-0.037578),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(9),
              ast.NumVal(-0.00171953),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(10),
              ast.NumVal(0.275619),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(11),
              ast.NumVal(0.00959933),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(12),
              ast.NumVal(-0.13406),
              ast.BinNumOpType.MUL,
          ),
      ]
  
      expected = ast.BinNumExpr(
          ast.NumVal(0.5),
          apply_op_to_expressions(
              ast.BinNumOpType.ADD,
              ast.NumVal(11.5264),
              *feature_weight_mul,
          ),
          ast.BinNumOpType.ADD,
      )
  
      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 7 for calling a global function with example usage: test_linear_model() without return types