code: def train_on_replay_memory(self, batch_info):
          
          self.model.train()
  
          # Algo will aggregate data into this list:
          batch_info['sub_batch_data'] = []
  
          for i in range(self.settings.training_rounds):
              sampled_rollout = self.env_roller.sample(batch_info, self.model, self.settings.training_steps)
  
              batch_result = self.algo.optimizer_step(
                  batch_info=batch_info,
                  device=self.device,
                  model=self.model,
                  rollout=sampled_rollout.to_device(self.device)
              )
  
              self.env_roller.update(rollout=sampled_rollout, batch_info=batch_result)
  
              batch_info['sub_batch_data'].append(batch_result)
  
          batch_info.aggregate_key('sub_batch_data')
docs: Train agent on a memory gotten from replay buffer