class_docstr: Context Mutator for LIGHT that removes random double-spaces from the context.
code: def episode_mutation(self, episode: List[Message]) -> List[Message]:
      context_ep = episode[0]
      delimiter = self.opt.get("delimiter", DEFAULT_DELIM)
      context_str = context_ep["text"].split("\n")
      context = [
          s for s in context_str if any(t in s for t in CONTEXT_KEYS)
      ]
      non_context = [
          s
          for s in context_str
          if not any(t in s for t in CONTEXT_KEYS)
      ]
      context = "\n".join([re.sub(r"[ ]+", " ", s) for s in context])
      cleaned_str = delimiter.join([context] + non_context)
      context_ep.force_set("text", cleaned_str)
      episode[0] = context_ep
      return episode
  
file_path: ParlAI/projects/light_whoami/task/mutators.py
imports: import re
  from parlai.core.message import Message
  from parlai.core.mutators import register_mutator, EpisodeMutator
  from typing import List
  from projects.light_whoami.task.utils import DEFAULT_DELIM, CONTEXT_KEYS, extract_characters
label_desc: Use image node_id 1 for calling the CleanContextMutator obj's underlying member method code with example usage: obj.episode_mutation(episode) and returns: episode