code: def test_rbp_bulk_match(demo_recs, normalize):
      "bulk and normal match"
      train, test, recs = demo_recs
  
      rla = RecListAnalysis()
      rla.add_metric(rbp, normalize=normalize)
      rla.add_metric(rbp, name="rbp_k", k=5, normalize=normalize)
      # metric without the bulk capabilities
      rla.add_metric(
          lambda *a: rbp(*a, normalize=normalize), name="ind_rbp"
      )
      rla.add_metric(
          lambda *a, **k: rbp(*a, normalize=normalize, **k),
          name="ind_rbp_k",
          k=5,
      )
      res = rla.compute(recs, test)
  
      res["diff"] = np.abs(res.rbp - res.ind_rbp)
      rl = res.nlargest(5, "diff")
      _log.info("res:\n%s", rl)
      user = rl.index[0]
      _log.info("user: %s\n%s", user, rl.iloc[0])
      _log.info("test:\n%s", test[test["user"] == user])
      urecs = recs[recs["user"] == user].join(
          test.set_index(["user", "item"])["rating"],
          on=["user", "item"],
          how="left",
      )
      _log.info("recs:\n%s", urecs[urecs["rating"].notnull()])
  
      assert res.rbp.values == approx(res.ind_rbp.values)
      assert res.rbp_k.values == approx(res.ind_rbp_k.values)
  
imports: import logging
  import numpy
  import pandas
  from pytest import approx, mark
  from hypothesis import given
  import hypothesis.strategies
  import hypothesis.extra.numpy
  from lenskit.metrics.topn import rbp, _bulk_rbp
  from lenskit.topn import RecListAnalysis
  from lenskit.util.test import demo_recs
label_desc: Use image node_id 11 for calling a global function with example usage: test_rbp_bulk_match(demo_recs, normalize) without return types