class_docstr:     Base class for on-policy rl trainers, e.g. PPO.
  
  Args:
      strategy (Strategy):the strategy to use for training
      data_buffer (NaiveExperienceBuffer): the buffer to collect experiences
      sample_buffer (bool, defaults to False): whether to sample from buffer
      dataloader_pin_memory (bool, defaults to True): whether to pin memory for data loader
      callbacks (List[Callback], defaults to []): the callbacks to call during training process
class_docstr_tok: ["Base","class","for","on-policy","rl","trainers",",","e.g",".","PPO",".","Args",":","strategy","(","Strategy",")",":","the","strategy","to","use","for","training","data_buffer","(","NaiveExperienceBuffer",")",":","the","buffer","to","collect","experiences","sample_buffer","(","bool",",","defaults","to","False",")",":","whether","to","sample","from","buffer","dataloader_pin_memory","(","bool",",","defaults","to","True",")",":","whether","to","pin","memory","for","data","loader","callbacks","(","List","[","Callback","]",",","defaults","to","[","]",")",":","the","callbacks","to","call","during","training","process"]
code: def _on_make_experience_end(self, experience: Experience) -> None:
      for callback in self.callbacks:
          callback.on_make_experience_end(experience)
  
imports: from abc import ABC, abstractmethod
  from contextlib import contextmanager
  from typing import List
  import torch.nn
  import tqdm
  from coati.experience_buffer import NaiveExperienceBuffer
  from coati.experience_maker import Experience
  from torch.optim import Optimizer
  from .callbacks import Callback
  from .strategies import Strategy
  from .utils import is_rank_0
label_desc: Use image node_id 5 for calling the OnPolicyTrainer obj's underlying member method code with example usage: obj._on_make_experience_end(experience) without return types