code: def __init__(self, venv, nstack):
      self.venv = venv
      self.nstack = nstack
      wos = venv.observation_space  # wrapped ob space
      low = np.repeat(wos.low, self.nstack, axis=-1)
      high = np.repeat(wos.high, self.nstack, axis=-1)
      self.stackedobs = np.zeros(
          (venv.num_envs,) + low.shape, low.dtype
      )
      observation_space = spaces.Box(
          low=low, high=high, dtype=venv.observation_space.dtype
      )
      VecEnvWrapper.__init__(
          self, venv, observation_space=observation_space
      )
  
file_path: baselines/baselines/common/vec_env/vec_frame_stack.py
imports: from .vec_env import VecEnvWrapper
  import numpy
  from gym import spaces
label_desc: Use image node_id 1 to create a new VecFrameStack object from inherited base classes: VecEnvWrapper with example: obj = VecFrameStack(venv, nstack)