code: def embedding_size_scalability():
      sequence_data = get_sequence_data()
      factorization_data = get_factorization_data()
  
      embedding_dims = (1e4, 1e4 * 5, 1e5, 1e5 * 5, 1e6, 1e6 * 5)
  
      bloom_sequence = np.array(
          [
              time_fitting(
                  sequence_model(int(dim), True), sequence_data
              )
              for dim in embedding_dims
          ]
      )
      baseline_sequence = np.array(
          [
              time_fitting(
                  sequence_model(int(dim), False), sequence_data
              )
              for dim in embedding_dims
          ]
      )
      sequence_ratio = bloom_sequence / baseline_sequence
  
      print("Sequence ratio {}".format(sequence_ratio))
  
      bloom_factorization = np.array(
          [
              time_fitting(
                  factorization_model(int(dim), True),
                  factorization_data,
              )
              for dim in embedding_dims
          ]
      )
      baseline_factorization = np.array(
          [
              time_fitting(
                  factorization_model(int(dim), False),
                  factorization_data,
              )
              for dim in embedding_dims
          ]
      )
      factorization_ratio = bloom_factorization / baseline_factorization
  
      print("Factorization ratio {}".format(factorization_ratio))
  
      return (
          np.array(embedding_dims),
          sequence_ratio,
          factorization_ratio,
      )
  
file_path: spotlight/examples/bloom_embeddings/performance.py
imports: import os
  import pickle
  import time
  import numpy
  import torch
  from spotlight.layers import BloomEmbedding, ScaledEmbedding
  from spotlight.factorization.implicit import ImplicitFactorizationModel
  from spotlight.factorization.representations import BilinearNet
  from spotlight.sequence.implicit import ImplicitSequenceModel
  from spotlight.sequence.representations import LSTMNet
  from spotlight.datasets.movielens import get_movielens_dataset
label_desc: Use image node_id 6 for calling a global function with example usage: embedding_size_scalability() and returns: np,  sequence_ratio,  factorization_ratio