code: def sample_pooling_hyperparameters(random_state, num):
      space = {
          "n_iter": N_ITER,
          "batch_size": BATCH_SIZE,
          "l2": L2,
          "learning_rate": LEARNING_RATES,
          "loss": LOSSES,
          "embedding_dim": EMBEDDING_DIM,
      }
  
      sampler = ParameterSampler(
          space, n_iter=num, random_state=random_state
      )
  
      for params in sampler:
          yield params
  
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 3 for calling a global function with example usage: sample_pooling_hyperparameters(random_state, num) without return types