def sample(self, batch_info: BatchInfo, model: RlModel, number_of_steps: int) -> Rollout:
<EOL>rollout = self.replay_buffer.sample_trajectories(rollout_length=number_of_steps, batch_info=batch_info)<EOL>last_observations = rollout.transition_tensors['<STR_LIT>'][-<NUM_LIT:1>].to(self.device)<EOL>final_values = model.value(last_observations).cpu()<EOL>rollout.rollout_tensors['<STR_LIT>'] = final_values<EOL>return rollout<EOL>
Sample experience from replay buffer and return a batch