code: def test_set_params_optimiser():
      """Test set_params method of Optimiser class."""
      with pytest.warns(UserWarning) as record:
          optimiser = Optimiser()
      assert len(record) == 1
      optimiser.set_params(scoring="accuracy")
      assert optimiser.scoring == "accuracy"
      optimiser.set_params(n_folds=3)
      assert optimiser.n_folds == 3
      optimiser.set_params(random_state=2)
      assert optimiser.random_state == 2
      optimiser.set_params(to_path="name")
      assert optimiser.to_path == "name"
      optimiser.set_params(verbose=False)
      assert not optimiser.verbose
      with pytest.warns(UserWarning) as record:
          optimiser.set_params(wrong_key=3)
      assert len(record) == 1
  
file_path: MLBox/tests/test_optimiser.py
imports: import pytest
  import numpy
  from mlbox.optimisation.optimiser import Optimiser
  from mlbox.preprocessing.drift_thresholder import Drift_thresholder
  from mlbox.preprocessing.reader import Reader
  from mlbox.optimisation import make_scorer
label_desc: Use image node_id 3 for calling a global function with example usage: test_set_params_optimiser() without return types