code: def _sliding_window(tensor, window_size, step_size=1):
      for i in range(len(tensor), 0, -step_size):
          yield tensor[max(i - window_size, 0) : i]
  
file_path: spotlight/spotlight/interactions.py
imports: import numpy
  import scipy.sparse
label_desc: Use image node_id 1 for calling a global function with example usage: _sliding_window(tensor, window_size, step_size) without return types