class_docstr: Frame stacking wrapper for vectorized environment
  
  :param venv: (VecEnv) the vectorized environment to wrap
  :param n_stack: (int) Number of frames to stack
code: def step_wait(self):
      observations, rewards, dones, infos = self.venv.step_wait()
      last_ax_size = observations.shape[-1]
      self.stackedobs = np.roll(
          self.stackedobs, shift=-last_ax_size, axis=-1
      )
      for i, done in enumerate(dones):
          if done:
              if "terminal_observation" in infos[i]:
                  old_terminal = infos[i]["terminal_observation"]
                  new_terminal = np.concatenate(
                      (
                          self.stackedobs[i, ..., :-last_ax_size],
                          old_terminal,
                      ),
                      axis=-1,
                  )
                  infos[i]["terminal_observation"] = new_terminal
              else:
                  warnings.warn(
                      "VecFrameStack wrapping a VecEnv without terminal_observation info"
                  )
              self.stackedobs[i] = 0
      self.stackedobs[..., -observations.shape[-1] :] = observations
      return self.stackedobs, rewards, dones, infos
  
file_path: stable-baselines/stable_baselines/common/vec_env/vec_frame_stack.py
imports: import warnings
  import numpy
  from gym import spaces
  from stable_baselines.common.vec_env.base_vec_env import VecEnvWrapper
label_desc: Use image node_id 2 for calling the VecFrameStack obj's underlying member method code with example usage: obj.step_wait() and returns: self,  rewards,  dones,  infos