code: def test_svd_save_load():
      ratings = lktu.ml_test.ratings
  
      original = svd.BiasedSVD(20)
      original.fit(ratings)
  
      mod = pickle.dumps(original)
      _log.info("serialized to %d bytes", len(mod))
      algo = pickle.loads(mod)
  
      assert algo.bias.mean_ == original.bias.mean_
      assert np.all(
          algo.bias.user_offsets_ == original.bias.user_offsets_
      )
      assert np.all(
          algo.bias.item_offsets_ == original.bias.item_offsets_
      )
      assert np.all(algo.user_components_ == original.user_components_)
  
file_path: lkpy/tests/test_svd.py
imports: import logging
  import pickle
  from lenskit.algorithms import svd
  import pandas
  import numpy
  from pytest import approx, mark
  import lenskit.util.test
  from lenskit.util import clone
label_desc: Use image node_id 6 for calling a global function with example usage: test_svd_save_load() without return types