code: def _get_tree_parameters(tree_info, extra_config):
      """
      Parse the tree and returns an in-memory friendly representation of its structure.
      """
      lefts = []
      rights = []
      features = []
      thresholds = []
      values = []
  
      # Subsitute feature names with ids if necessary.
      if constants.FEATURE_NAMES in extra_config:
          feature_names = extra_config[constants.FEATURE_NAMES]
          for f_id, f_name in enumerate(feature_names):
              tree_info = tree_info.replace(f_name, str(f_id))
      _tree_traversal(
          tree_info.replace("[f", "")
          .replace("[", "")
          .replace("]", "")
          .split(),
          lefts,
          rights,
          features,
          thresholds,
          values,
      )
  
      return TreeParameters(lefts, rights, features, thresholds, values)
  
file_path: hummingbird/hummingbird/ml/operator_converters/xgb.py
imports: import numpy
  from onnxconverter_common.registration import register_converter
  from .None import constants
  from ._gbdt_commons import convert_gbdt_classifier_common, convert_gbdt_common
  from ._tree_commons import TreeParameters
label_desc: Use image node_id 2 for calling a global function with example usage: _get_tree_parameters(tree_info, extra_config) and returns: TreeParameters