class_docstr: A wrapper which stacks previously seen frames.
class_docstr_tok: ["A","wrapper","which","stacks","previously","seen","frames","."]
code: def __init__(self, batch_env, history=4):
      super(StackWrapper, self).__init__(batch_env)
      self.history = history
      self.old_shape = batch_env.observ_shape
      # TODO(afrozm): Make into tf.get_variable and use_resource=True
      self._observ = tf.Variable(
          tf.zeros((len(self),) + self.observ_shape, self.observ_dtype),
          trainable=False,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from six.moves import range
  from tensor2tensor.rl.envs.in_graph_batch_env import InGraphBatchEnv
  import tensorflow.compat.v1
label_desc: Use image node_id 1 to create a new StackWrapper object from inherited base classes: WrapperBase with example: obj = StackWrapper(batch_env, history)