code: def normalize_reply(x):
      normalized_x = parlai_normalize_reply(x).strip()
      for t in UNWANTED_TOKENS:
          if normalized_x.lower().endswith(t):
              normalized_x = normalized_x[: -len(t)].strip()
      if "\n" in normalized_x:
          multilines = [
              ln.strip()
              for ln in normalized_x.split("\n")
              if len(ln.strip()) > 0
          ]
          if len(multilines) > 0:
              multilines = [
                  (ln + "," if ln[-1] not in punctuation else ln)
                  for ln in multilines
              ]
              normalized_x = " ".join(multilines)
              if normalized_x[-1] == ",":
                  normalized_x = normalized_x[:-1] + "."
      return normalized_x
  
imports: from string import punctuation
  import copy
  from typing import List
  from parlai.core.mutators import register_mutator, ManyEpisodeMutator, MessageMutator
  from parlai.core.message import Message
  from parlai.mutators.flatten import FlattenMutator
  from parlai.utils.strings import normalize_reply
  from parlai.tasks.wizard_of_wikipedia.agents import TOKEN_KNOWLEDGE, TOKEN_END_KNOWLEDGE
  from parlai.tasks.wizard_of_internet import constants
  from .constants import FeedbackType, UNWANTED_TOKENS
label_desc: Use image node_id 1 for calling a global function with example usage: normalize_reply(x) and returns: normalized_x