code: def data_implicit_sequence():
      max_sequence_length = 200
      min_sequence_length = 20
      step_size = 200
  
      interactions = movielens.get_movielens_dataset("100K")
  
      train, test = user_based_train_test_split(
          interactions, random_state=RANDOM_STATE
      )
  
      train = train.to_sequence(
          max_sequence_length=max_sequence_length,
          min_sequence_length=min_sequence_length,
          step_size=step_size,
      )
  
      test = test.to_sequence(
          max_sequence_length=max_sequence_length,
          min_sequence_length=min_sequence_length,
          step_size=step_size,
      )
  
      model = ImplicitSequenceModel(
          loss="adaptive_hinge",
          representation="lstm",
          batch_size=8,
          learning_rate=1e-2,
          l2=1e-3,
          n_iter=2,
          use_cuda=CUDA,
          random_state=RANDOM_STATE,
      )
  
      model.fit(train, verbose=True)
  
      return train, test, model
  
file_path: spotlight/tests/test_evaluation_metrics.py
imports: import os
  import numpy
  import pytest
  from spotlight.evaluation import precision_recall_score, sequence_precision_recall_score
  from spotlight.cross_validation import random_train_test_split, user_based_train_test_split
  from spotlight.datasets import movielens
  from spotlight.factorization.implicit import ImplicitFactorizationModel
  from spotlight.sequence.implicit import ImplicitSequenceModel
label_desc: Use image node_id 2 for calling a global function with example usage: data_implicit_sequence() and returns: train,  test,  model