<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_policy_train_batch(self, batch_info: BatchInfo):
 """ Perform an 'on-policy' training step of evaluating an env and a single backpropagation step """

        self.model.train()

        rollout = self.env_roller.rollout(batch_info, self.model, self.settings.number_of_steps).to_device(self.device)

        batch_result = self.algo.optimizer_step(
            batch_info=batch_info,
            device=self.device,
            model=self.model,
            rollout=rollout
        )

        batch_info['sub_batch_data'].append(batch_result)
        batch_info['frames'] = rollout.frames()
        batch_info['episode_infos'] = rollout.episode_information()