code: def test_implicit_sequence_serialization(data):
      train, test = data
      train = train.to_sequence(max_sequence_length=128)
      test = test.to_sequence(max_sequence_length=128)
  
      model = ImplicitSequenceModel(
          loss="bpr",
          representation=CNNNet(
              train.num_items,
              embedding_dim=32,
              kernel_width=3,
              dilation=(1,),
              num_layers=1,
          ),
          batch_size=128,
          learning_rate=1e-1,
          l2=0.0,
          n_iter=5,
          random_state=RANDOM_STATE,
          use_cuda=CUDA,
      )
      model.fit(train)
  
      mrr_original = sequence_mrr_score(model, test).mean()
      mrr_recovered = sequence_mrr_score(_reload(model), test).mean()
  
      assert mrr_original == mrr_recovered
  
file_path: spotlight/tests/test_serialization.py
imports: import os
  import shutil
  import tempfile
  import numpy
  import pytest
  import torch
  from spotlight.cross_validation import random_train_test_split
  from spotlight.datasets import movielens
  from spotlight.evaluation import mrr_score, sequence_mrr_score
  from spotlight.evaluation import rmse_score
  from spotlight.factorization.explicit import ExplicitFactorizationModel
  from spotlight.factorization.implicit import ImplicitFactorizationModel
  from spotlight.sequence.implicit import ImplicitSequenceModel
  from spotlight.sequence.representations import CNNNet
label_desc: Use image node_id 5 for calling a global function with example usage: test_implicit_sequence_serialization(data) without return types