docstr: Test training models with kwargs
docstr_tok: ["Test","training","models","with","kwargs"]
code: def test_train_regressor_kwargs(self, space, fspace):
      """Test training models with kwargs"""
      array = flatten_numpy(to_numpy(data, space), fspace)
      model = train_regressor(
          "RandomForestRegressor",
          array,
          max_depth=2,
          max_features="sqrt",
      )
      assert model.max_depth == 2
      assert model.max_features == "sqrt"
  
imports: import numpy
  import pandas
  import pytest
  from sklearn.ensemble import AdaBoostRegressor, BaggingRegressor, ExtraTreesRegressor, GradientBoostingRegressor, RandomForestRegressor
  from orion.analysis.base import average, flatten_numpy, flatten_params, ranking, to_numpy, train_regressor
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.worker.transformer import build_required_space
label_desc: Use image node_id 2 for calling the TestTrainRegressor obj's underlying member method code with example usage: obj.test_train_regressor_kwargs(space, fspace) without return types