code: def test_memorized_batch():
      algo = basic.Memorized(simple_df)
  
      preds = algo.predict(
          pd.DataFrame({"user": [10, 10, 12], "item": [1, 2, 1]})
      )
      assert isinstance(preds, pd.Series)
      assert preds.name == "prediction"
      assert set(preds.index) == set([0, 1, 2])
      assert all(preds == [4.0, 5.0, 3.0])
  
file_path: lkpy/tests/test_util_algos.py
imports: from lenskit.algorithms import basic
  import pandas
  import numpy
  import lenskit.util.test
label_desc: Use image node_id 2 for calling a global function with example usage: test_memorized_batch() without return types