code: def test_recall_series_set():
      prec = _test_recall(pd.Series([1, 2, 3, 4]), [1, 3, 5, 7])
      assert prec == approx(0.5)
  
      prec = _test_recall(pd.Series([1, 2, 3, 4]), range(4, 9))
      assert prec == approx(0.2)
  
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 6 for calling a global function with example usage: test_recall_series_set() without return types