code: def test_regression():
      estimator = AdaGradRegressor(random_state=1)
      utils.get_regression_model_trainer()(estimator)
  
      assembler = assemblers.SklearnLinearModelAssembler(estimator)
      actual = assembler.assemble()
  
      feature_weight_mul = [
          ast.BinNumExpr(
              ast.FeatureRef(0),
              ast.NumVal(-0.08558826944690746),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(1),
              ast.NumVal(0.0803724696787377),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(2),
              ast.NumVal(-0.03516743076774846),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(3),
              ast.NumVal(0.26469178947134087),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(4),
              ast.NumVal(0.15651985221012488),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(5),
              ast.NumVal(1.5186399078028587),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(6),
              ast.NumVal(0.10089874009193693),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(7),
              ast.NumVal(-0.011426237067026246),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(8),
              ast.NumVal(0.0861987777487293),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(9),
              ast.NumVal(-0.0057791506839322574),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(10),
              ast.NumVal(0.3357752757550913),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(11),
              ast.NumVal(0.020189965076849486),
              ast.BinNumOpType.MUL,
          ),
          ast.BinNumExpr(
              ast.FeatureRef(12),
              ast.NumVal(-0.7390647599317609),
              ast.BinNumOpType.MUL,
          ),
      ]
  
      expected = assemblers.utils.apply_op_to_expressions(
          ast.BinNumOpType.ADD, ast.NumVal(0.0), *feature_weight_mul
      )
  
      assert utils.cmp_exprs(actual, expected)
  
imports: from lightning.classification import AdaGradClassifier
  from lightning.regression import AdaGradRegressor
  from m2cgen import assemblers, ast
  from tests import utils
label_desc: Use image node_id 1 for calling a global function with example usage: test_regression() without return types