class_docstr: Reversed teacher where labels are what bot said, text is what human said.
  
  Only support swapping text & labels, no other guarantees.
class_docstr_tok: ["Reversed","teacher","where","labels","are","what","bot","said",",","text","is","what","human","said",".","Only","support","swapping","text","&","labels",",","no","other","guarantees","."]
code: def _setup_data(self, path):
      super()._setup_data(path)
      new_eps = []
      min_len = self.opt.get("light_min_conv_length")
      if min_len:
          self.episodes = [
              e for e in self.episodes if len(e) >= min_len + 1
          ]
      for ep in self.episodes:
          texts = [ex["text"] for ex in ep]
          labels = [ex["labels"] for ex in ep]
          new_ep = []
          context = texts[0]
          if self.opt.get("light_use_setting"):
              if self.opt.get(
                  "light_prettify_setting"
              ) and self.opt.get("light_use_person_names_prefix"):
                  char1, char2 = [
                      texts[1].split(":")[0],
                      labels[0][0].split(":")[0],
                  ]
                  name, desc = context.split("_setting_desc")
                  name = name.replace("_setting_name", "").replace(
                      ", Somewhere", ""
                  )
                  context = f"A {char1} and a {char2} are in {name}. {desc.split('.')[0]}"
              new_ep = [
                  {
                      "text": "",
                      "labels": [f"*{context}*"],
                      "episode_done": False,
                  }
              ]
          new_ep += [
              {
                  "text": labels[i][0],
                  "labels": [texts[i + 1]],
                  "episode_done": False,
              }
              for i in range(0, len(texts) - 1)
          ]
          if new_ep:
              new_ep[-1]["episode_done"] = True
              new_eps.append(new_ep)
  
      max_len = self.opt.get("light_max_conv_length")
      hard_max_cap = self.opt.get("light_hard_max_length_cap")
      if max_len:
          if hard_max_cap:
              new_eps = [e for e in new_eps if len(e) <= max_len]
          else:
              new_eps = [e[:max_len] for e in new_eps]
              for e in new_eps:
                  e[-1]["episode_done"] = True
  
      self.episodes = new_eps
      self.num_exs = sum([len(ep) for ep in self.episodes])
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.teachers import ParlAIDialogTeacher
  from .build import build, get_fpath
  import copy
  import os
  import random
label_desc: Use image node_id 2 for calling the ReversedTeacher obj's underlying member method code with example usage: obj._setup_data(path) without return types