code: def test_fallback_train_one_pred_impossible():
      algo = basic.Fallback(basic.Memorized(simple_df))
      algo.fit(lktu.ml_test.ratings)
  
      preds = algo.predict_for_user(10, [1, 2])
      assert set(preds.index) == set([1, 2])
      assert all(preds == pd.Series({1: 4.0, 2: 5.0}))
  
      preds = algo.predict_for_user(12, [1, 3])
      assert set(preds.index) == set([1, 3])
      assert preds.loc[1] == 3.0
      assert np.isnan(preds.loc[3])
  
file_path: lkpy/tests/test_fallback.py
imports: from lenskit.algorithms import basic
  from lenskit.algorithms.bias import Bias
  from lenskit import util
  import pandas
  import numpy
  import binpickle
  import lenskit.util.test
  from pytest import approx
label_desc: Use image node_id 2 for calling a global function with example usage: test_fallback_train_one_pred_impossible() without return types