def sample_transitions(self, batch_size, batch_info, discount_factor=None) -> Transitions:
indexes = self.backend.sample_batch_transitions(batch_size)<EOL>transition_tensors = self.backend.get_transitions(indexes)<EOL>return Trajectories(<EOL>num_steps=batch_size,<EOL>num_envs=self.backend.num_envs,<EOL>environment_information=None,<EOL>transition_tensors={k: torch.from_numpy(v) for k, v in transition_tensors.items()},<EOL>rollout_tensors={}<EOL>).to_transitions()<EOL>
Sample batch of transitions and return them