code: def test_bloom(compression_ratio, expected_rmse):
      interactions = movielens.get_movielens_dataset("100K")
  
      train, test = random_train_test_split(
          interactions, random_state=RANDOM_STATE
      )
  
      user_embeddings = BloomEmbedding(
          interactions.num_users,
          32,
          compression_ratio=compression_ratio,
          num_hash_functions=2,
      )
      item_embeddings = BloomEmbedding(
          interactions.num_items,
          32,
          compression_ratio=compression_ratio,
          num_hash_functions=2,
      )
      network = BilinearNet(
          interactions.num_users,
          interactions.num_items,
          user_embedding_layer=user_embeddings,
          item_embedding_layer=item_embeddings,
      )
  
      model = ExplicitFactorizationModel(
          loss="regression",
          n_iter=10,
          batch_size=1024,
          learning_rate=1e-2,
          l2=1e-5,
          representation=network,
          use_cuda=CUDA,
      )
  
      model.fit(train)
      print(model)
  
      rmse = rmse_score(model, test)
      print(rmse)
  
      assert rmse - EPSILON < expected_rmse
  
file_path: spotlight/tests/factorization/test_explicit.py
imports: import os
  import numpy
  import pytest
  from spotlight.cross_validation import random_train_test_split
  from spotlight.datasets import movielens
  from spotlight.evaluation import rmse_score
  from spotlight.factorization.explicit import ExplicitFactorizationModel
  from spotlight.factorization.representations import BilinearNet
  from spotlight.layers import BloomEmbedding
label_desc: Use image node_id 5 for calling a global function with example usage: test_bloom(compression_ratio, expected_rmse) without return types