def METHOD_NAME(self, episode: int) -> None:
    for callback in self.callbacks:
        callback.on_episode_start(episode)
    try:
        yield
    finally:
        for callback in self.callbacks:
            callback.on_episode_end(episode)