code: def test_bias_transform_indexes():
      algo = Bias()
      ratings = ml_test.ratings
  
      normed = algo.fit_transform(ratings, indexes=True)
  
      assert all(normed["user"] == ratings["user"])
      assert all(normed["item"] == ratings["item"])
      assert all(
          normed["uidx"]
          == algo.user_offsets_.index.get_indexer(ratings["user"])
      )
      assert all(
          normed["iidx"]
          == algo.item_offsets_.index.get_indexer(ratings["item"])
      )
      denorm = algo.inverse_transform(normed)
      assert denorm["rating"].values == approx(
          ratings["rating"].values, 1.0e-6
      )
  
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 16 for calling a global function with example usage: test_bias_transform_indexes() without return types