code: def test_rbp_bulk_at_top():
      truth = pd.DataFrame.from_records(
          [(1, 50, 3.5), (1, 30, 3.5)],
          columns=["LKTruthID", "item", "rating"],
      ).set_index(["LKTruthID", "item"])
  
      recs = pd.DataFrame.from_records(
          [(1, 1, 50, 1), (1, 1, 30, 2), (1, 1, 72, 3)],
          columns=["LKRecID", "LKTruthID", "item", "rank"],
      )
  
      rbp = _bulk_rbp(recs, truth)
      assert len(rbp) == 1
      assert rbp.index.tolist() == [1]
      assert rbp.iloc[0] == approx(0.75)
  
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 9 for calling a global function with example usage: test_rbp_bulk_at_top() without return types