class_docstr: BaseIOTensor
  
  A `BaseIOTensor` is a basic `IOTensor` with only one component.
  It is associated with a `Tensor` of `shape` and `dtype`, with
  data backed by IO. It is the building block for `IOTensor`.
  For example, a `CSVIOTensor` consists of multiple `BaseIOTensor`
  where each one is a column of the CSV.
  
  All `IOTensor` types are either a subclass of `BaseIOTensor`,
  or are a composite of a collection of `BaseIOTensor`.
  
  The additional properties exposed by `BaseIOTensor` are `shape`
  and `dtype` associated with counterparts in `Tensor`.
class_docstr_tok: ["BaseIOTensor","A","`","BaseIOTensor","`","is","a","basic","`","IOTensor","`","with","only","one","component",".","It","is","associated","with","a","`","Tensor","`","of","`","shape","`","and","`","dtype","`",",","with","data","backed","by","IO",".","It","is","the","building","block","for","`","IOTensor","`",".","For","example",",","a","`","CSVIOTensor","`","consists","of","multiple","`","BaseIOTensor","`","where","each","one","is","a","column","of","the","CSV",".","All","`","IOTensor","`","types","are","either","a","subclass","of","`","BaseIOTensor","`",",","or","are","a","composite","of","a","collection","of","`","BaseIOTensor","`",".","The","additional","properties","exposed","by","`","BaseIOTensor","`","are","`","shape","`","and","`","dtype","`","associated","with","counterparts","in","`","Tensor","`","."]
docstr: Returns the sliding window of this IOTensor.
code: def window(self, size):
      """Returns the sliding window of this IOTensor."""
      spec = tf.TensorSpec(
          tf.TensorShape(self._function.length - size + 1).concatenate(
              size
          ),
          self.dtype,
      )
  
      class _Function:
          """_Function"""
  
          def __init__(self, func, spec, size):
              self._func = func
              self._spec = spec
              self._size = size
              self._length = self._spec.shape[0]
  
          def __call__(self, start, stop):
              start, stop, _ = slice(start, stop).indices(self._length)
              if start >= self._length:
                  raise IndexError(
                      "index %s is out of range" % slice(start, stop)
                  )
              return tf.reshape(
                  tf.image.extract_patches(
                      tf.reshape(
                          self._func(start, stop + self._size - 1),
                          [1, 1, stop + self._size - 1 - start, 1],
                      ),
                      sizes=[1, 1, self._size, 1],
                      strides=[1, 1, 1, 1],
                      rates=[1, 1, 1, 1],
                      padding="VALID",
                  ),
                  self._spec.shape,
              )
  
      return BaseIOTensor(
          spec, _Function(self._function, spec, size), internal=True
      )
  
imports: import tensorflow
label_desc: Use image node_id 6 for calling the BaseIOTensor obj's underlying member method code with example usage: obj.window(size) and returns: BaseIOTensor, tf