code: def test_unrated_big():
      ratings = lktu.ml_test.ratings
      users = ratings.user.unique()
      items = ratings.item.unique()
      user_items = ratings.set_index("user").item
  
      sel = basic.UnratedItemCandidateSelector()
      s2 = sel.fit(ratings)
      assert s2 is sel
  
      # test 100 random users
      for u in np.random.choice(users, 100, False):
          candidates = sel.candidates(u)
          candidates = pd.Series(candidates)
          uis = user_items.loc[u]
          assert len(uis) + len(candidates) == len(items)
          assert candidates.nunique() == len(candidates)
          assert all(~candidates.isin(uis))
  
file_path: lkpy/tests/test_candidate_selector.py
imports: from lenskit.algorithms import basic
  import lenskit.util.test
  import pandas
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: test_unrated_big() without return types