def _stack_n_step_experience(self, experience):
        """
            Stacks n steps into single numpy arrays
            Args:
                experience: (type: dictionary) subtrajectory information
            Returns:
                observations: stacked numpy array for observations in dim 0
                actions: stacked numpy array for actions in dim 0
                rewards: stacked numpy array for rewards in dim 0
                dones: stacked numpy array for termination flag in dim 0
        """
        actions = np.stack(experience['actions'])
        rewards = np.array(experience['rewards'])
        dones = np.array(experience['dones'])
        return actions, rewards, dones

            Stacks n steps into single numpy arrays
            Args:
                experience: (type: dictionary) subtrajectory information
            Returns:
                observations: stacked numpy array for observations in dim 0
                actions: stacked numpy array for actions in dim 0
                rewards: stacked numpy array for rewards in dim 0
                dones: stacked numpy array for termination flag in dim 0
        
surreal/learner/aggregator.py