class_docstr: ALL LIGHT Teacher: combines all gender bias mitigation methods described in.
  
  <https://arxiv.org/abs/1911.03842>.
  
  This teacher combines methods for gender bias mitigation in
  dialogue generation on the LIGHT dialogue task, including:
  - Adding more positive data (Pos Data):`--add-new-data`
  - Conditional training (Bias Ctrl): `--add-conditional`
  - Counterfactual Data Augmentation (CDA): `--add-counterfactual`
  
  For more information, please see our projects page:
  <https://parl.ai/projects/genderation_bias/>
class_docstr_tok: ["ALL","LIGHT","Teacher",":","combines","all","gender","bias","mitigation","methods","described","in",".","<","https",":","\/\/arxiv.org\/abs\/1911.03842",">",".","This","teacher","combines","methods","for","gender","bias","mitigation","in","dialogue","generation","on","the","LIGHT","dialogue","task",",","including",":","-","Adding","more","positive","data","(","Pos","Data",")",":","`","--","add-new-data","`","-","Conditional","training","(","Bias","Ctrl",")",":","`","--","add-conditional","`","-","Counterfactual","Data","Augmentation","(","CDA",")",":","`","--","add-counterfactual","`","For","more","information",",","please","see","our","projects","page",":","<","https",":","\/\/parl.ai\/projects\/genderation_bias\/",">"]
code: def __init__(self, opt, shared=None):
      self.opt = opt
      self.gender_dict = read_gender_tsv(
          os.path.join(_path(opt), GENDERED_LIST)
      )
      self.fixed_random = random.Random(42)
  
      self.add_conditional = opt["add_conditional"]
      self.add_counterfactual = opt["add_counterfactual"]
      self.add_new_data = opt["add_new_data"]
  
      self.force_conditional = opt["force_conditional"]
      self.bucket_only = opt["bucket_only"]
      if self.force_conditional == "none":
          self.force_conditional = None
      if self.bucket_only == "none":
          self.bucket_only = None
  
      if shared and "data" in shared:
          self.data = shared["data"]
      else:
          self.data = self._setup_data(opt)
  
      super().__init__(opt, shared)
      self.reset()
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.message import Message
  from parlai.core.teachers import FixedDialogTeacher
  from parlai.tasks.light_dialog.agents import DefaultTeacher
  from parlai.tasks.light_genderation_bias.build import build
  from parlai.utils.io import PathManager
  from collections import deque
  from copy import deepcopy
  import csv
  import json
  import os
  import random
label_desc: Use image node_id 2 to create a new LightGenderTeacher object from inherited base classes: FixedDialogTeacher with example: obj = LightGenderTeacher(opt, shared)