class_docstr: Teacher for written two-person dialogues with labels being relevant/useful parts in
  the input sentence.
  
  The different datatypes of the labels within the data have also been encoded as
  `label_types`
class_docstr_tok: ["Teacher","for","written","two-person","dialogues","with","labels","being","relevant\/useful","parts","in","the","input","sentence",".","The","different","datatypes","of","the","labels","within","the","data","have","also","been","encoded","as","`","label_types","`"]
code: def get(self, episode_idx, entry_idx):
      conversation = self.convos[episode_idx]
      conv_len = len(conversation["utterances"])
      utterance = conversation["utterances"][entry_idx]["text"]
  
      # Check if episode is complete
      ep_done = entry_idx == conv_len - 1
      action = {
          "id": self.id,
          "text": utterance,
          "episode_done": ep_done,
      }
  
      # Setup Labels as "text" from segments
      action["labels"] = []
      action["label_types"] = []
      segments = conversation["utterances"][entry_idx]["segments"]
      for segment in segments:
          action["labels"] += [segment["text"]]
          tmp = []
          for annot in segment["annotations"]:
              tmp += [annot["name"]]
          action["label_types"] += [tmp]
  
      return action
  
imports: from parlai.core.params import ParlaiParser
  import os
  import pandas
  from parlai.core.opt import Opt
  import parlai.core.tod.tod_core
  from typing import Optional
  from parlai.utils.data import DatatypeHelper
  from parlai.utils.io import PathManager
  import parlai.tasks.taskmaster.build
  import parlai.core.tod.tod_agents
  from parlai.core.teachers import FixedDialogTeacher
  from .None import tm_utils
  import json
label_desc: Use image node_id 2 for calling the SelfDialogueSegmentTeacher obj's underlying member method code with example usage: obj.get(episode_idx, entry_idx) and returns: action