code: def get_parameters_for_sklearn_common(tree_infos, extra_config):
      """
      Parse sklearn-based trees, including SklearnRandomForestClassifier/Regressor and SklearnGradientBoostingClassifier/Regressor
      Args:
          tree_infos: The information representing a tree (ensemble)
          Returns: The tree parameters wrapped into an instance of `operator_converters._tree_commons_TreeParameters`
      """
      lefts = tree_infos.tree_.children_left
      rights = tree_infos.tree_.children_right
      features = tree_infos.tree_.feature
      thresholds = tree_infos.tree_.threshold
      values = tree_infos.tree_.value
  
      return TreeParameters(lefts, rights, features, thresholds, values)
  
imports: import copy
  import numpy
  import torch
  from ._tree_implementations import TreeImpl
  from ._tree_implementations import GEMMDecisionTreeImpl, TreeTraversalDecisionTreeImpl, PerfectTreeTraversalDecisionTreeImpl
  from .None import constants
  from hummingbird.ml.exceptions import MissingConverter
label_desc: Use image node_id 5 for calling a global function with example usage: get_parameters_for_sklearn_common(tree_infos, extra_config) and returns: TreeParameters