code: def test_recall_bulk_k(demo_recs):
      "bulk and normal match"
      train, test, recs = demo_recs
      assert test["user"].value_counts().max() > 5
  
      rla = topn.RecListAnalysis()
      rla.add_metric(recall, name="rk", k=5)
      rla.add_metric(recall)
      # metric without the bulk capabilities
      rla.add_metric(
          lambda *a, **k: recall(*a, **k), name="ind_rk", k=5
      )
      rla.add_metric(lambda *a: recall(*a), name="ind_r")
      res = rla.compute(recs, test)
  
      print(res)
      _log.info("recall mismatches:\n%s", res[res.recall != res.ind_r])
  
      assert res.recall.values == approx(res.ind_r.values)
      assert res.rk.values == approx(res.ind_rk.values)
  
file_path: lkpy/tests/test_topn_recall.py
imports: import logging
  import numpy
  import pandas
  from pytest import approx
  from lenskit.metrics.topn import recall
  from lenskit.util.test import demo_recs
  from lenskit import topn
label_desc: Use image node_id 13 for calling a global function with example usage: test_recall_bulk_k(demo_recs) without return types