docstr: Replace newline character by whitespace so that the data format plays nicely
  with BB2, which splits each utterance by newline and expects a corresponding
  speaker label (if we don't replace the newline character here, we have to later
  match each speaker label back to variable number of sentences, which overly
  complicates things) c.f.
  
  line 606 of projects/blenerbot2/agents/blenderbot2.py
docstr_tok: ["Replace","newline","character","by","whitespace","so","that","the","data","format","plays","nicely","with","BB2",",","which","splits","each","utterance","by","newline","and","expects","a","corresponding","speaker","label","(","if","we","do","n't","replace","the","newline","character","here",",","we","have","to","later","match","each","speaker","label","back","to","variable","number","of","sentences",",","which","overly","complicates","things",")","c.f",".","line","606","of","projects\/blenerbot2\/agents\/blenderbot2.py"]
code: def _get_text(self, utterance):
      """
      Replace newline character by whitespace so that the data format plays nicely
      with BB2, which splits each utterance by newline and expects a corresponding
      speaker label (if we don't replace the newline character here, we have to later
      match each speaker label back to variable number of sentences, which overly
      complicates things) c.f.
  
      line 606 of projects/blenerbot2/agents/blenderbot2.py
      """
      return utterance["text"].replace("\n", " ")
  
imports: from typing import Optional
  from parlai.core.opt import Opt
  from parlai.core.teachers import DialogTeacher
  from parlai.core.params import ParlaiParser
  from .build import build
  from collections import defaultdict
  import jsonlines
  from parlai.utils.data import DatatypeHelper
  import random
  import copy
  import os
label_desc: Use image node_id 3 for calling the DefaultTeacher obj's underlying member method code with example usage: obj._get_text(utterance) and returns: utterance