code: def test_sparse_matrix_implicit():
      ratings = ml_test.ratings
      ratings = ratings.loc[:, ["user", "item"]]
      mat, uidx, iidx = sparse_ratings(ratings)
  
      assert mat.nrows == len(uidx)
      assert mat.nrows == ratings.user.nunique()
      assert mat.ncols == len(iidx)
      assert mat.ncols == ratings.item.nunique()
      assert mat.values is None
  
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 2 for calling a global function with example usage: test_sparse_matrix_implicit() without return types