code: def test_go_before_forge_experiment_error(opt_pro):
      """Test that invoking :meth:`hyperparameter_hunter.optimization.protocol_core.BaseOptPro.go`
      before :meth:`hyperparameter_hunter.optimization.protocol_core.BaseOptPro.forge_experiment`
      raises ValueError"""
      opt = opt_pro()
      with pytest.raises(
          ValueError,
          match="Must invoke `forge_experiment` before starting .*",
      ):
          opt.go()
  
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 2 for calling a global function with example usage: test_go_before_forge_experiment_error(opt_pro) without return types