code: def test_tree_ensemble_regressor_rule(self):
      x = np.arange(9).reshape((-1, 3)).astype(np.float32) / 10 - 0.5
      expected_agg = {
          "BRANCH_LEQ": np.array(
              [[0.576923], [0.576923], [0.576923]], dtype=np.float32
          ),
          "BRANCH_GT": np.array(
              [[0.5], [0.5], [0.5]], dtype=np.float32
          ),
          "BRANCH_LT": np.array(
              [[0.576923], [0.576923], [0.576923]], dtype=np.float32
          ),
          "BRANCH_GTE": np.array(
              [[0.5], [0.5], [0.5]], dtype=np.float32
          ),
          "BRANCH_EQ": np.array(
              [[1.0], [1.0], [1.0]], dtype=np.float32
          ),
          "BRANCH_NEQ": np.array(
              [[0.076923], [0.076923], [0.076923]], dtype=np.float32
          ),
      }
      for rule, expected in expected_agg.items():
          with self.subTest(rule=rule):
              onx = self._get_test_tree_ensemble_regressor("SUM", rule)
              self._check_ort(onx, {"X": x}, equal=True)
              sess = ReferenceEvaluator(onx)
              got = sess.run(None, {"X": x})
              assert_allclose(expected, got[0], atol=1e-6)
  
imports: import unittest
  from functools import wraps
  from os import getenv
  import numpy
  from numpy.testing import assert_allclose
  from parameterized import parameterized
  from onnx import ONNX_ML, TensorProto, TypeProto, ValueInfoProto
  from onnx.checker import check_model
  from onnx.defs import onnx_opset_version
  from onnx.helper import make_graph, make_model_gen_version, make_node, make_opsetid, make_tensor, make_tensor_value_info
  from onnx.reference import ReferenceEvaluator
label_desc: Use image node_id 24 for calling the TestReferenceEvaluatorAiOnnxMl obj's underlying member method code with example usage: obj.test_tree_ensemble_regressor_rule() without return types