code: def convert_sklearn_gbdt_regressor(operator, device, extra_config):
      """
      Converter for `sklearn.ensemble.GradientBoostingRegressor`.
  
      Args:
          operator: An operator wrapping a `sklearn.ensemble.GradientBoostingRegressor` or
          `sklearn.ensemble.HistGradientBoostingRegressor` model
          device: String defining the type of device the converted operator should be run on
          extra_config: Extra configuration used to select the best conversion strategy
  
      Returns:
          A PyTorch model
      """
      assert operator is not None, "Cannot convert None operator"
  
      # Get tree information out of the operator.
      tree_infos = operator.raw_operator.estimators_.ravel().tolist()
      n_features = _get_n_features(operator.raw_operator)
      extra_config[
          constants.LEARNING_RATE
      ] = operator.raw_operator.learning_rate
      # For sklearn models we need to massage the parameters a bit before generating the parameters for tree_trav.
      extra_config[
          constants.GET_PARAMETERS_FOR_TREE_TRAVERSAL
      ] = get_parameters_for_tree_trav_sklearn
  
      # Get the value for Alpha.
      if operator.raw_operator.init == "zero":
          base_prediction = [[0.0]]
      elif operator.raw_operator.init is None:
          base_prediction = (
              operator.raw_operator.init_.constant_.tolist()
          )
      else:
          raise RuntimeError(
              "Custom initializers for GBDT are not yet supported in Hummingbird."
          )
  
      extra_config[constants.BASE_PREDICTION] = base_prediction
  
      return convert_gbdt_common(
          operator,
          tree_infos,
          get_parameters_for_sklearn_common,
          n_features,
          None,
          extra_config,
      )
  
file_path: hummingbird/hummingbird/ml/operator_converters/sklearn/gbdt.py
imports: import numpy
  from onnxconverter_common.registration import register_converter
  from ..None import constants
  from .._gbdt_commons import convert_gbdt_common, convert_gbdt_classifier_common
  from .._tree_commons import get_parameters_for_sklearn_common, get_parameters_for_tree_trav_sklearn, TreeParameters
label_desc: Use image node_id 4 for calling a global function with example usage: convert_sklearn_gbdt_regressor(operator, device, extra_config) and returns: convert_gbdt_common