code: def test_predict():
      no_users, no_items = (10, 100)
  
      train = sp.coo_matrix((no_users, no_items), dtype=np.int32)
  
      model = LightFM()
      model.fit_partial(train)
  
      for uid in range(no_users):
          scores_arr = model.predict(
              np.repeat(uid, no_items), np.arange(no_items)
          )
          scores_int = model.predict(uid, np.arange(no_items))
          assert np.allclose(scores_arr, scores_int)
  
      with pytest.raises(ValueError):
          model.predict("foo", np.arange(no_items))
  
imports: import numpy
  import pytest
  import scipy.sparse
  from lightfm.lightfm import LightFM
label_desc: Use image node_id 4 for calling a global function with example usage: test_predict() without return types