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(precision, name="pk", k=5)
      rla.add_metric(precision)
      # metric without the bulk capabilities
      rla.add_metric(
          lambda *a, **k: precision(*a, **k), name="ind_pk", k=5
      )
      rla.add_metric(lambda *a: precision(*a), name="ind_p")
      res = rla.compute(recs, test)
  
      assert res.precision.values == approx(res.ind_p.values)
      assert res.pk.values == approx(res.ind_pk.values)
  
file_path: lkpy/tests/test_topn_precision.py
imports: import numpy
  import pandas
  from pytest import approx
  from lenskit.topn import precision
  from lenskit.util.test import demo_recs
  from lenskit import topn
label_desc: Use image node_id 12 for calling a global function with example usage: test_recall_bulk_k(demo_recs) without return types