class_docstr: Keep only the most recent turn.
  
  This mutator obliterates the history of the conversation, keeping only the very last
  thing said. Every turn is still evaluated, but treated as a new episode.
code: def many_episode_mutation(
      self, episode: List[Message]
  ) -> Iterator[List[Message]]:
      context = []
      for i, message in enumerate(episode):
          if i == 0 and self.opt.get("preserve_context"):
              text = message.pop("text").split("\n")
              context = text[:-1]
              message["text"] = text[-1]
          message["text"] = "\n".join(context + [message.pop("text")])
          yield [message]
  
file_path: ParlAI/parlai/mutators/last_turn.py
imports: from typing import List, Iterator, Optional
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.message import Message
  from parlai.core.mutators import ManyEpisodeMutator, register_mutator
label_desc: Use image node_id 2 for calling the LastTurnMutator obj's underlying member method code with example usage: obj.many_episode_mutation(episode) without return types