code: def test_fill_users():
      rla = topn.RecListAnalysis()
      rla.add_metric(topn.precision)
      rla.add_metric(topn.recall)
  
      algo = UserUser(20, min_nbrs=10)
      algo = Recommender.adapt(algo)
  
      splits = xf.sample_users(ml_test.ratings, 1, 50, xf.SampleN(5))
      train, test = next(splits)
      algo.fit(train)
  
      rec_users = test["user"].sample(50).unique()
      assert len(rec_users) < 50
      recs = batch.recommend(algo, rec_users, 25)
  
      scores = rla.compute(recs, test, include_missing=True)
      assert len(scores) == test["user"].nunique()
      assert scores["recall"].notna().sum() == len(rec_users)
      assert all(scores["ntruth"] == 5)
  
      mscores = rla.compute(recs, test)
      assert len(mscores) < len(scores)
  
      recall = scores.loc[scores["recall"].notna(), "recall"].copy()
      recall, mrecall = recall.align(mscores["recall"])
      assert all(recall == mrecall)
  
imports: from pathlib import Path
  import logging
  import numpy
  import pandas
  from pytest import approx, mark
  from lenskit.algorithms.user_knn import UserUser
  from lenskit.algorithms.item_knn import ItemItem
  from lenskit.algorithms.basic import PopScore
  from lenskit.algorithms.ranking import PlackettLuce
  from lenskit.algorithms import Recommender
  from lenskit.util.test import ml_test, demo_recs
  from lenskit.metrics.topn import _dcg, precision, recall
  from lenskit import topn, batch, crossfold
label_desc: Use image node_id 8 for calling a global function with example usage: test_fill_users() without return types