code: def test_als_predict_basic_for_new_ratings():
      """Test ImplicitMF ability to support new ratings"""
      algo = als.ImplicitMF(20, iterations=10)
      algo.fit(simple_df)
  
      new_ratings = pd.Series(
          [4.0, 5.0], index=[1, 2]
      )  # items as index and ratings as values
  
      preds = algo.predict_for_user(15, [3], new_ratings)
  
      assert len(preds) == 1
      assert preds.index[0] == 3
      assert preds.loc[3] >= -0.1
      assert preds.loc[3] <= 5
  
imports: import logging
  from lenskit import util
  from lenskit.algorithms import als
  import pandas
  import numpy
  from scipy import stats
  import binpickle
  from seedbank import numpy_rng
  from pytest import mark, approx
  import lenskit.util.test
  from lenskit.algorithms import Recommender
  from lenskit.util import Stopwatch
label_desc: Use image node_id 3 for calling a global function with example usage: test_als_predict_basic_for_new_ratings() without return types