def get_frame_with_future(self, frame_idx, env_idx):
if frame_idx == self.current_idx:<EOL><INDENT>raise VelException("<STR_LIT>")<EOL><DEDENT>past_frame = self.get_frame(frame_idx, env_idx)<EOL>if not self.dones_buffer[frame_idx, env_idx]:<EOL><INDENT>next_idx = (frame_idx + <NUM_LIT:1>) % self.buffer_capacity<EOL>next_frame = self.state_buffer[next_idx, env_idx]<EOL>if self.frame_history > <NUM_LIT:1>:<EOL><INDENT>future_frame = np.concatenate([<EOL>past_frame.take(indices=np.arange(<NUM_LIT:1>, past_frame.shape[-<NUM_LIT:1>]), axis=-<NUM_LIT:1>), next_frame<EOL>], axis=-<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>future_frame = next_frame<EOL><DEDENT><DEDENT>else:<EOL><INDENT>future_frame = np.zeros_like(past_frame)<EOL><DEDENT>return past_frame, future_frame<EOL>
Return frame from the buffer together with the next frame