code: def _generate_sequences(
      user_ids, item_ids, indices, max_sequence_length, step_size
  ):
      for i in range(len(indices)):
          start_idx = indices[i]
  
          if i >= len(indices) - 1:
              stop_idx = None
          else:
              stop_idx = indices[i + 1]
  
          for seq in _sliding_window(
              item_ids[start_idx:stop_idx],
              max_sequence_length,
              step_size,
          ):
              yield (user_ids[i], seq)
  
file_path: spotlight/spotlight/interactions.py
imports: import numpy
  import scipy.sparse
label_desc: Use image node_id 2 for calling a global function with example usage: _generate_sequences(user_ids, item_ids, indices, max_sequence_length, step_size) without return types