code: def _get_synthetic_data(
      num_users=100,
      num_items=100,
      num_interactions=10000,
      randomness=0.01,
      order=2,
      max_sequence_length=10,
      random_state=None,
  ):
      interactions = synthetic.generate_sequential(
          num_users=num_users,
          num_items=num_items,
          num_interactions=num_interactions,
          concentration_parameter=randomness,
          order=order,
          random_state=random_state,
      )
  
      print(
          "Max prob {}".format(
              (
                  np.unique(interactions.item_ids, return_counts=True)[
                      1
                  ]
                  / num_interactions
              ).max()
          )
      )
  
      train, test = user_based_train_test_split(
          interactions, random_state=random_state
      )
  
      train = train.to_sequence(
          max_sequence_length=max_sequence_length, step_size=None
      )
      test = test.to_sequence(
          max_sequence_length=max_sequence_length, step_size=None
      )
  
      return train, test
  
imports: import os
  import numpy
  import pytest
  from spotlight.cross_validation import user_based_train_test_split
  from spotlight.datasets import synthetic
  from spotlight.evaluation import sequence_mrr_score
  from spotlight.layers import BloomEmbedding
  from spotlight.sequence.implicit import ImplicitSequenceModel
  from spotlight.sequence.representations import CNNNet, LSTMNet, PoolNet
label_desc: Use image node_id 1 for calling a global function with example usage: _get_synthetic_data(num_users, num_items, num_interactions, randomness, order, max_sequence_length, random_state) and returns: train,  test