code: def test_invalid_base_estimator(est, opt):
      """Test that an OptimizationProtocol complains when given an invalid `base_estimator`.
      Parametrized via :func:`pytest_generate_tests`"""
      with pytest.raises(
          TypeError, match="Expected `base_estimator` in .*"
      ):
          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 6 for calling a global function with example usage: test_invalid_base_estimator(est, opt) without return types