class_docstr: Knowledge Teacher.
  
  Input is Context. Target is selected __knowledge__.
class_docstr_tok: ["Knowledge","Teacher",".","Input","is","Context",".","Target","is","selected","__knowledge__","."]
docstr: Remove knowledge component of message, and move selected sentence to target.
docstr_tok: ["Remove","knowledge","component","of","message",",","and","move","selected","sentence","to","target","."]
code: def finalize_message(self, msg: Dict[str, Any]) -> Message:
      """
      Remove knowledge component of message, and move selected sentence to target.
      """
      msg["text"] = msg[NO_KNOWLEDGE_FIELD]
      msg["labels"] = [
          " ".join(msg[CONST.SELECTED_SENTENCES])
          .replace(TOKEN_KNOWLEDGE, "")
          .replace(TOKEN_END_KNOWLEDGE, "")
          .strip()
      ]
      return Message(msg)
  
imports: from abc import ABC, abstractmethod
  import os
  from typing import Tuple, List, Optional, Any, Dict
  import random
  from parlai.core.message import Message
  from parlai.core.metrics import F1Metric, BleuMetric, RougeMetric, AverageMetric, ExactMatchMetric, normalize_answer
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.teachers import ChunkTeacher, ChunkOutput
  import parlai.tasks.wizard_of_internet.constants
  from parlai.utils.conversations import Conversations
  from parlai.utils.data import DatatypeHelper
  import parlai.utils.logging
  from parlai.tasks.wizard_of_wikipedia.agents import TOKEN_KNOWLEDGE, TOKEN_END_KNOWLEDGE
  from projects.seeker.utils import extract_entities, remove_possible_title_from_text
label_desc: Use image node_id 2 for calling the KnowledgeTeacher obj's underlying member method code with example usage: obj.finalize_message(msg) and returns: Message