code: def on_batch_end(self, metrics: dict, experience: Experience) -> None:
      if self.ignore_this_episode:
          return
      self.batch_timer.end()
  
      batch_size, seq_len = experience.sequences.shape
  
      self.total_samples += batch_size
  
      # actor forward-backward, 3 means forward(1) + backward(2)
      self.learn_flop += (
          self.actor_num_params
          * batch_size
          * seq_len
          * 2
          * (3 + int(self.enable_grad_checkpoint))
      )
      # critic forward-backward
      self.learn_flop += (
          self.critic_num_params
          * batch_size
          * seq_len
          * 2
          * (3 + int(self.enable_grad_checkpoint))
      )
  
imports: from time import time
  from typing import Optional
  import torch
  import torch.distributed
  from coati.experience_maker import Experience
  from .base import MakerCallback, TrainerCallback
label_desc: Use image node_id 5 for calling the TrainerPerformanceEvaluator obj's underlying member method code with example usage: obj.on_batch_end(metrics, experience) without return types