<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_transitions_forward_steps(self, indexes, forward_steps, discount_factor):
 """ Get dictionary of a transition data - where the target of a transition is n steps forward along the trajectory. Rewards are properly aggregated according to the discount factor, and the process stops when trajectory is done. """

        frame_batch_shape = (
                [indexes.shape[0], indexes.shape[1]]
                + list(self.state_buffer.shape[2:-1])
                + [self.state_buffer.shape[-1] * self.frame_history]
        )

        simple_batch_shape = [indexes.shape[0], indexes.shape[1]]

        past_frame_buffer = np.zeros(frame_batch_shape, dtype=self.state_buffer.dtype)
        future_frame_buffer = np.zeros(frame_batch_shape, dtype=self.state_buffer.dtype)

        reward_buffer = np.zeros(simple_batch_shape, dtype=np.float32)
        dones_buffer = np.zeros(simple_batch_shape, dtype=bool)

        for buffer_idx, frame_row in enumerate(indexes):
            for env_idx, frame_idx in enumerate(frame_row):
                past_frame, future_frame, reward, done = self.get_frame_with_future_forward_steps(
                    frame_idx, env_idx, forward_steps=forward_steps, discount_factor=discount_factor
                )

                past_frame_buffer[buffer_idx, env_idx] = past_frame
                future_frame_buffer[buffer_idx, env_idx] = future_frame
                reward_buffer[buffer_idx, env_idx] = reward
                dones_buffer[buffer_idx, env_idx] = done

        actions = take_along_axis(self.action_buffer, indexes)

        transition_tensors = {
            'observations': past_frame_buffer,
            'actions': actions,
            'rewards': reward_buffer,
            'observations_next': future_frame_buffer,
            'dones': dones_buffer.astype(np.float32),
        }

        for name in self.extra_data:
            transition_tensors[name] = take_along_axis(self.extra_data[name], indexes)

        return transition_tensors