docs: def sliding_window(sequence, win_size, step=1):
      """
      Returns a generator that will iterate through
      the defined chunks of input sequence.  Input sequence
      must be iterable.
  
      Credit: http://scipher.wordpress.com/2010/12/02/simple-sliding-window-iterator-in-python/
      https://github.com/xguse/scipherPyProj/blob/master/scipherSrc/defs/basicDefs.py
      """
      
      # Verify the inputs
      try:
          it = iter(sequence)
      except TypeError:
          raise ValueError("sequence must be iterable.")
      if not isinstance(win_size, int):
          raise ValueError("type(win_size) must be int.")
      if not isinstance(step, int):
          raise ValueError("type(step) must be int.")
      if step > win_size:
          raise ValueError("step must not be larger than win_size.")
      if win_size > len(sequence):
          raise ValueError("win_size must not be larger than sequence length.")
      
      # Pre-compute number of chunks to emit
      num_chunks = ((len(sequence) - win_size) / step) + 1
      
      # Do the work
      for i in range(0, num_chunks * step, step):
          yield sequence[i:i+win_size]