class_docstr: Stack windowed inputs (x(t-m+1), ... x(t)).
class_docstr_tok: ["Stack","windowed","inputs","(","x","(","t-m+1",")",",","...","x","(","t",")",")","."]
docstr: Return preprocessed input x.
docstr_tok: ["Return","preprocessed","input","x","."]
code: def preprocess(self, x):
      """Return preprocessed input x."""
      if x.shape != self._input_shape:
          raise ValueError(
              "Expecting input in shape {0} but get {1}\n".format(
                  self._input_shape, x.shape
              )
          )
  
      if x.dtype != self.__dtype:
          raise ValueError(
              "Expecting input in dtype {0} but get {1}\n".format(
                  self.__dtype, x.dtype
              )
          )
  
      self.__history.append(x)
      return np.stack(list(self.__history))
  
imports: from abc import ABCMeta, abstractmethod
  from collections import deque
  import numpy
  from PIL import Image
label_desc: Use image node_id 4 for calling the SlidingWindow obj's underlying member method code with example usage: obj.preprocess(x) and returns: np