code: def get_trees(self, data=None, data_missing=None):
      # load each tree
      trees = []
      for tree_index in range(self.num_trees):
          # load the per-tree params
          # depth = len(self.loaded_cb_model['oblivious_trees'][tree_index]['splits'])
  
          # load the nodes
  
          # Re-compute the number of samples that pass through each node if we are given data
          leaf_weights = self.loaded_cb_model["oblivious_trees"][
              tree_index
          ]["leaf_weights"]
          leaf_weights_unraveled = [0] * (
              len(leaf_weights) - 1
          ) + leaf_weights
          leaf_weights_unraveled[0] = sum(leaf_weights)
          for index in range(len(leaf_weights) - 2, 0, -1):
              leaf_weights_unraveled[index] = (
                  leaf_weights_unraveled[2 * index + 1]
                  + leaf_weights_unraveled[2 * index + 2]
              )
  
          leaf_values = self.loaded_cb_model["oblivious_trees"][
              tree_index
          ]["leaf_values"]
          leaf_values_unraveled = [0] * (
              len(leaf_values) - 1
          ) + leaf_values
  
          children_left = [
              i * 2 + 1 for i in range(len(leaf_values) - 1)
          ]
          children_left += [-1] * len(leaf_values)
  
          children_right = [i * 2 for i in range(1, len(leaf_values))]
          children_right += [-1] * len(leaf_values)
  
          children_default = [
              i * 2 + 1 for i in range(len(leaf_values) - 1)
          ]
          children_default += [-1] * len(leaf_values)
  
          # load the split features and borders
          # split features and borders go from leafs to the root
          split_features_index = []
          borders = []
  
          # split features and borders go from leafs to the root
          for elem in self.loaded_cb_model["oblivious_trees"][
              tree_index
          ]["splits"]:
              split_type = elem.get("split_type")
              if split_type == "FloatFeature":
                  split_feature_index = elem.get("float_feature_index")
                  borders.append(elem["border"])
              elif split_type == "OneHotFeature":
                  split_feature_index = elem.get("cat_feature_index")
                  borders.append(elem["value"])
              else:
                  split_feature_index = elem.get(
                      "ctr_target_border_idx"
                  )
                  borders.append(elem["border"])
              split_features_index.append(split_feature_index)
  
          split_features_index_unraveled = []
          for counter, feature_index in enumerate(
              split_features_index[::-1]
          ):
              split_features_index_unraveled += [feature_index] * (
                  2**counter
              )
          split_features_index_unraveled += [0] * len(leaf_values)
  
          borders_unraveled = []
          for counter, border in enumerate(borders[::-1]):
              borders_unraveled += [border] * (2**counter)
          borders_unraveled += [0] * len(leaf_values)
  
          trees.append(
              SingleTree(
                  {
                      "children_left": np.array(children_left),
                      "children_right": np.array(children_right),
                      "children_default": np.array(children_default),
                      "feature": np.array(
                          split_features_index_unraveled
                      ),
                      "threshold": np.array(borders_unraveled),
                      "value": np.array(leaf_values_unraveled).reshape(
                          (-1, 1)
                      ),
                      "node_sample_weight": np.array(
                          leaf_weights_unraveled
                      ),
                  },
                  data=data,
                  data_missing=data_missing,
              )
          )
  
      return trees
  
imports: import json
  import os
  import struct
  import time
  import warnings
  import numpy
  import pandas
  import scipy.sparse
  import scipy.special
  from packaging import version
  from ..None import maskers
  from .._explanation import Explanation
  from ..utils import assert_import, record_import_error, safe_isinstance
  from ..utils._exceptions import DimensionError, ExplainerError, InvalidFeaturePerturbationError, InvalidMaskerError, InvalidModelError
  from ..utils._legacy import DenseData
  from ._explainer import Explainer
label_desc: Use image node_id 2 for calling the CatBoostTreeModelLoader obj's underlying member method code with example usage: obj.get_trees(data, data_missing) and returns: trees