code: def plot(dims, sequence, factorization):
      import matplotlib
  
      matplotlib.use("Agg")  # NOQA
      import matplotlib.pyplot as plt
      import seaborn as sns
  
      sns.set_style("darkgrid")
  
      plt.ylabel("Speed improvement")
      plt.xlabel("Size of embedding layers")
      plt.title("Fitting speed (1.0 = no change)")
      plt.xscale("log")
  
      plt.plot(dims, 1.0 / sequence, label="Sequence model")
      plt.plot(dims, 1.0 / factorization, label="Factorization model")
      plt.legend(loc="lower right")
      plt.savefig("speed.png")
      plt.close()
  
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 7 for calling a global function with example usage: plot(dims, sequence, factorization) without return types