code: def test_bias_prediction_serial(self):
      predictions = np.array(
          [1.0, 0, 0, 1.0, 0, 1.0, 0, 0, 0, 0, 1.0, 2.0],
          dtype=np.float32,
      )
  
      projected_user_biases = np.array([0.0, 1.0, 2.0])
      projected_item_biases = np.array([0.0, -1.0, -2.0, -3.0])
  
      x_user = np.array([0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2])
      x_item = np.array([0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3])
  
      biased_predictions = bias_prediction_serial(
          tf_prediction_serial=predictions,
          tf_projected_user_biases=projected_user_biases,
          tf_projected_item_biases=projected_item_biases,
          tf_x_user=x_user,
          tf_x_item=x_item,
      ).eval(session=self.session)
  
      expected_biased_predictions = np.array(
          [
              1.0,
              -1.0,
              -2.0,
              -2.0,
              1.0,
              1.0,
              -1.0,
              -2.0,
              2.0,
              1.0,
              1.0,
              1.0,
          ],
          dtype=np.float32,
      )
  
      self.assertTrue(
          (biased_predictions == expected_biased_predictions).all()
      )
  
file_path: tensorrec/test/test_recommendation_graphs.py
imports: import numpy
  import tensorflow
  import scipy.sparse
  from unittest import TestCase
  from tensorrec.prediction_graphs import CosineSimilarityPredictionGraph
  from tensorrec.recommendation_graphs import project_biases, split_sparse_tensor_indices, bias_prediction_dense, bias_prediction_serial, densify_sampled_item_predictions, rank_predictions, collapse_mixture_of_tastes, predict_similar_items
  from tensorrec.session_management import get_session
label_desc: Use image node_id 5 for calling the RecommendationGraphsTestCase obj's underlying member method code with example usage: obj.test_bias_prediction_serial() without return types