code: def test_bias_full():
      algo = Bias()
      algo.fit(simple_df)
      assert algo.mean_ == approx(3.5)
  
      assert algo.item_offsets_ is not None
      assert algo.item_offsets_.index.name == "item"
      assert set(algo.item_offsets_.index) == set([1, 2, 3])
      assert algo.item_offsets_.loc[1:3].values == approx(
          np.array([0, 1.5, -1.5])
      )
  
      assert algo.user_offsets_ is not None
      assert algo.user_offsets_.index.name == "user"
      assert set(algo.user_offsets_.index) == set([10, 12, 13])
      assert algo.user_offsets_.loc[[10, 12, 13]].values == approx(
          np.array([0.25, -0.5, 0])
      )
  
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 2 for calling a global function with example usage: test_bias_full() without return types