def to_transitions(self) -> '<STR_LIT>':
<EOL>return Transitions(<EOL>size=self.num_steps * self.num_envs,<EOL>environment_information=<EOL>[ei for l in self.environment_information for ei in l]<EOL>if self.environment_information is not None else None,<EOL>transition_tensors={<EOL>name: tensor_util.merge_first_two_dims(t) for name, t in self.transition_tensors.items()<EOL>},<EOL>extra_data=self.extra_data<EOL>)<EOL>
Convert given rollout to Transitions