code: def convert(self, model, data, test_data, args, model_name):
      from onnxmltools.convert import convert_xgboost
      from onnxmltools.convert import convert_lightgbm
      from skl2onnx import convert_sklearn
      from onnxmltools.convert.common.data_types import FloatTensorType
  
      self.configure(data, model, args)
      self.is_regression = data.learning_task == LearningTask.REGRESSION
  
      with Timer() as t:
          if self.params["operator"] == "xgb":
              initial_type = [
                  (
                      "input",
                      FloatTensorType([1, self.params["input_size"]]),
                  )
              ]
              if model._Booster.feature_names is not None:
                  fixed_names = list(
                      map(
                          lambda x: str(x),
                          range(len(model._Booster.feature_names)),
                      )
                  )
                  model._Booster.feature_names = fixed_names
              self.model = convert_xgboost(
                  model, initial_types=initial_type, target_opset=11
              )
          else:
              batch = min(len(data.X_test), self.params["batch_size"])
              remainder = len(data.X_test) % batch
              initial_type = [
                  (
                      "input",
                      FloatTensorType(
                          [batch, self.params["input_size"]]
                      ),
                  )
              ]
  
              if self.params["operator"] == "lgbm":
                  converter = convert_lightgbm
              elif self.params["operator"] == "rf":
                  converter = convert_sklearn
  
              self.model = converter(model, initial_types=initial_type)
              if remainder > 0:
                  initial_type = [
                      (
                          "input",
                          FloatTensorType(
                              [remainder, self.params["input_size"]]
                          ),
                      )
                  ]
                  self.remainder_model = converter(
                      model, initial_types=initial_type, target_opset=11
                  )
  
          import onnxruntime as ort
  
          self.remainder_sess = None
          sess_options = ort.SessionOptions()
          sess_options.intra_op_num_threads = self.params["nthread"]
          sess_options.execution_mode = ort.ExecutionMode.ORT_SEQUENTIAL
          self.sess = ort.InferenceSession(
              self.model.SerializeToString(), sess_options=sess_options
          )
          if self.remainder_model is not None:
              self.remainder_sess = ort.InferenceSession(
                  self.remainder_model.SerializeToString(),
                  sess_options=sess_options,
              )
  
      return t.interval
  
imports: from abc import ABC, abstractmethod
  import numpy
  from benchmarks.timer import Timer
  from benchmarks.datasets import LearningTask
  from hummingbird.ml import constants
  from hummingbird.ml import convert, convert_batch
label_desc: Use image node_id 3 for calling the ONNXMLBackend obj's underlying member method code with example usage: obj.convert(model, data, test_data, args, model_name) and returns: t