code: def evaluate_pooling_model(
      hyperparameters, train, test, validation, random_state
  ):
      h = hyperparameters
  
      model = ImplicitSequenceModel(
          loss=h["loss"],
          representation="pooling",
          batch_size=h["batch_size"],
          learning_rate=h["learning_rate"],
          l2=h["l2"],
          n_iter=h["n_iter"],
          use_cuda=CUDA,
          random_state=random_state,
      )
  
      model.fit(train, verbose=True)
  
      test_mrr = sequence_mrr_score(model, test)
      val_mrr = sequence_mrr_score(model, validation)
  
      return test_mrr, val_mrr
  
imports: import hashlib
  import json
  import os
  import shutil
  import sys
  import numpy
  from sklearn.model_selection import ParameterSampler
  from spotlight.datasets.movielens import get_movielens_dataset
  from spotlight.cross_validation import user_based_train_test_split
  from spotlight.sequence.implicit import ImplicitSequenceModel
  from spotlight.sequence.representations import CNNNet
  from spotlight.evaluation import sequence_mrr_score
label_desc: Use image node_id 6 for calling a global function with example usage: evaluate_pooling_model(hyperparameters, train, test, validation, random_state) and returns: test_mrr,  val_mrr