code: def test_sklearn_api():
      model = LightFM()
      params = model.get_params()
      model2 = LightFM(**params)
      params2 = model2.get_params()
      assert params == params2
      model.set_params(**params)
      params["invalid_param"] = 666
      with pytest.raises(ValueError):
          model.set_params(**params)
  
imports: import numpy
  import pytest
  import scipy.sparse
  from lightfm.lightfm import LightFM
label_desc: Use image node_id 13 for calling a global function with example usage: test_sklearn_api() without return types