code: def test_valid_base_estimator(est, opt):
      """Test that an OptimizationProtocol does not complain when given a valid `base_estimator`.
      Also test that selected strings and Regressor instances are equally valid values. Parametrized
      via :func:`pytest_generate_tests`"""
      opt(base_estimator=est)
  
imports: from hyperparameter_hunter import Environment
  from hyperparameter_hunter import settings
  from hyperparameter_hunter.i_o.exceptions import EnvironmentInactiveError, EnvironmentInvalidError
  from hyperparameter_hunter.optimization.backends.skopt import protocols
  from hyperparameter_hunter.utils.general_utils import flatten, subdict
  from hyperparameter_hunter.utils.learning_utils import get_toy_classification_data
  import pytest
  from unittest import mock
  from sklearn.linear_model import Ridge
  from skopt.learning.gaussian_process.gpr import GaussianProcessRegressor
  from skopt.learning.gbrt import GradientBoostingQuantileRegressor
  from skopt.learning.forest import RandomForestRegressor, ExtraTreesRegressor
label_desc: Use image node_id 5 for calling a global function with example usage: test_valid_base_estimator(est, opt) without return types