code: def test_passes():
      """[Model Selection] Test sets error score on failed scoring."""
  
      evl = Evaluator(bad_scorer, error_score=0, n_jobs=1, verbose=5)
  
      with open(os.devnull, "w") as f, redirect_stdout(f):
          evl = np.testing.assert_warns(
              FitFailedWarning,
              evl.fit,
              X,
              y,
              estimators=[OLS()],
              param_dicts={"ols": {"offset": randint(1, 10)}},
              n_iter=1,
          )
      assert evl.results["test_score-m"]["ols"] == 0
  
file_path: mlens/mlens/model_selection/tests/test_model_selection.py
imports: import os
  import numpy
  from mlens.model_selection import Evaluator, benchmark
  from mlens.metrics import mape, make_scorer
  from mlens.utils.exceptions import FitFailedWarning
  from mlens.utils.dummy import OLS, Scale
  from mlens.testing import Data
  from scipy.stats import randint
label_desc: Use image node_id 5 for calling a global function with example usage: test_passes() without return types