code: def _assemble_tree(self, tree):
      if "leaf" in tree:
          return ast.NumVal(tree["leaf"], dtype=np.float32)
  
      threshold = ast.NumVal(tree["split_condition"], dtype=np.float32)
      split = tree["split"]
      if split in self._feature_name_to_idx:
          feature_idx = self._feature_name_to_idx[split]
      elif split[0] == "f":
          feature_idx = int(split[1:])
      else:
          feature_idx = int(split)
      feature_ref = ast.FeatureRef(feature_idx)
  
      # Since comparison with NaN (missing) value always returns false we
      # should make sure that the node ID specified in the "missing" field
      # always ends up in the "else" branch of the ast.IfExpr.
      use_lt_comp = tree["missing"] == tree["no"]
      if use_lt_comp:
          comp_op = ast.CompOpType.LT
          true_child_id = tree["yes"]
          false_child_id = tree["no"]
      else:
          comp_op = ast.CompOpType.GTE
          true_child_id = tree["no"]
          false_child_id = tree["yes"]
  
      return ast.IfExpr(
          ast.CompExpr(feature_ref, threshold, comp_op),
          self._assemble_child_tree(tree, true_child_id),
          self._assemble_child_tree(tree, false_child_id),
      )
  
imports: import json
  import math
  import numpy
  from m2cgen import ast
  from m2cgen.assemblers import utils
  from m2cgen.assemblers.base import ModelAssembler
  from m2cgen.assemblers.linear import _linear_to_ast
label_desc: Use image node_id 2 for calling the XGBoostTreeModelAssembler obj's underlying member method code with example usage: obj._assemble_tree(tree) and returns: ast, ast