code: def test_fsvd_known_preds():
      algo = svd.FunkSVD(15, iterations=125, lrate=0.001)
      _log.info("training %s on ml data", algo)
      algo.fit(lktu.ml_test.ratings)
  
      dir = Path(__file__).parent
      pred_file = dir / "funksvd-preds.csv"
      _log.info("reading known predictions from %s", pred_file)
      known_preds = pd.read_csv(str(pred_file))
      pairs = known_preds.loc[:, ["user", "item"]]
  
      preds = algo.predict(pairs)
      known_preds.rename(
          columns={"prediction": "expected"}, inplace=True
      )
      merged = known_preds.assign(prediction=preds)
      merged["error"] = merged.expected - merged.prediction
      assert not any(merged.prediction.isna() & merged.expected.notna())
      err = merged.error
      err = err[err.notna()]
      try:
          assert all(err.abs() < 0.01)
      except AssertionError as e:
          bad = merged[
              merged.error.notna() & (merged.error.abs() >= 0.01)
          ]
          _log.error("erroneous predictions:\n%s", bad)
          raise e
  
file_path: lkpy/tests/test_funksvd.py
imports: import logging
  import pickle
  from pathlib import Path
  import lenskit.algorithms.funksvd
  import pandas
  import numpy
  from pytest import approx, mark
  import lenskit.util.test
label_desc: Use image node_id 11 for calling a global function with example usage: test_fsvd_known_preds() without return types