code: def test_sparse_matrix_scipy_implicit():
      ratings = ml_test.ratings
      ratings = ratings.loc[:, ["user", "item"]]
      mat, uidx, iidx = sparse_ratings(ratings, scipy=True)
  
      assert sps.issparse(mat)
      assert sps.isspmatrix_csr(mat)
      assert len(uidx) == ratings.user.nunique()
      assert len(iidx) == ratings.item.nunique()
  
      assert all(mat.data == 1.0)
  
file_path: lkpy/tests/test_matrix.py
imports: import scipy.sparse
  import pandas
  from lenskit.data import sparse_ratings
  from lenskit.util.test import ml_test
  from pytest import mark
label_desc: Use image node_id 4 for calling a global function with example usage: test_sparse_matrix_scipy_implicit() without return types