code: def test_set_params_with_unknown_key_raises(self, base_cls):
      with pytest.raises(ValueError) as exc:
          base_cls().set_params(foo=123)
      msg = exc.value.args[0]
  
      # message contains "'" around variable name starting from sklearn 1.1
      assert msg.startswith(
          "Invalid parameter foo for estimator <skorch.callbacks.base.Callback"
      ) or msg.startswith(
          "Invalid parameter 'foo' for estimator <skorch.callbacks.base.Callback"
      )
  
file_path: skorch/skorch/tests/callbacks/test_all.py
imports: import itertools
  import pytest
label_desc: Use image node_id 5 for calling the TestAllCallbacks obj's underlying member method code with example usage: obj.test_set_params_with_unknown_key_raises(base_cls) without return types