code: def test_bias_new_user_predict():
      algo = Bias()
      algo.fit(simple_df)
  
      ratings = pd.DataFrame(
          {"item": [1, 2, 3], "rating": [1.5, 2.5, 3.5]}
      )
      ratings = ratings.set_index("item").rating
      p = algo.predict_for_user(None, [1, 3], ratings=ratings)
  
      offs = ratings - algo.mean_ - algo.item_offsets_
      umean = offs.mean()
      _log.info("user mean is %f", umean)
  
      assert len(p) == 2
      assert p.values == approx(
          (algo.mean_ + algo.item_offsets_ + umean).loc[[1, 3]].values
      )
  
imports: from lenskit.algorithms.bias import Bias
  from lenskit import util
  import logging
  import pickle
  import binpickle
  import pandas
  import numpy
  from pytest import approx, raises, mark
  from lenskit.util.test import ml_test
label_desc: Use image node_id 11 for calling a global function with example usage: test_bias_new_user_predict() without return types