code: def sequence_window(seq, n=2):
      # adapted from https://stackoverflow.com/questions/46516730/how-to-work-with-zip-on-2-generators-s-t-each-returns-the-same-item-that-changes
      it = iter(seq)
      win = deque((next(it, None) for _ in range(n)), maxlen=n)
      yield list(win)
      for e in it:
          win.append(e)
          yield list(win)
  
imports: from typing import List, Tuple, Union, Optional, Callable, Dict
  from collections import deque
  from scattertext.features.FeatsFromSpacyDoc import FeatsFromSpacyDoc
  from scattertext.features.featoffsets.feat_and_offset_getter import FeatAndOffsetGetter
  from scattertext.Common import MY_ENGLISH_STOP_WORDS
label_desc: Use image node_id 1 for calling a global function with example usage: sequence_window(seq, n) without return types