class_docstr: A :class:`~fairseq.data.FairseqDataset` wrapper that transform bos on
  collated samples of language pair dataset.
  
  Note that the transformation is applied in :func:`collater`.
  
  Args:
      dataset (~fairseq.data.FairseqDataset): dataset that collates sample into
          LanguagePairDataset schema
      src_eos (int): original source end-of-sentence symbol index to be replaced
      new_src_eos (int, optional): new end-of-sentence symbol index to replace source eos symbol
      tgt_bos (int, optional): original target beginning-of-sentence symbol index to be replaced
      new_tgt_bos (int, optional): new beginning-of-sentence symbol index to replace at the
          beginning of 'prev_output_tokens'
class_docstr_tok: ["A",":","class",":","`","~fairseq.data.FairseqDataset","`","wrapper","that","transform","bos","on","collated","samples","of","language","pair","dataset",".","Note","that","the","transformation","is","applied","in",":","func",":","`","collater","`",".","Args",":","dataset","(","~fairseq.data.FairseqDataset",")",":","dataset","that","collates","sample","into","LanguagePairDataset","schema","src_eos","(","int",")",":","original","source","end-of-sentence","symbol","index","to","be","replaced","new_src_eos","(","int",",","optional",")",":","new","end-of-sentence","symbol","index","to","replace","source","eos","symbol","tgt_bos","(","int",",","optional",")",":","original","target","beginning-of-sentence","symbol","index","to","be","replaced","new_tgt_bos","(","int",",","optional",")",":","new","beginning-of-sentence","symbol","index","to","replace","at","the","beginning","of","'prev_output_tokens","'"]
code: def __init__(
      self,
      dataset: FairseqDataset,
      src_eos: int,
      new_src_eos: Optional[int] = None,
      tgt_bos: Optional[int] = None,
      new_tgt_bos: Optional[int] = None,
  ):
      self.dataset = dataset
      self.src_eos = src_eos
      self.new_src_eos = new_src_eos
      self.tgt_bos = tgt_bos
      self.new_tgt_bos = new_tgt_bos
  
file_path: fairseq/fairseq/data/transform_eos_lang_pair_dataset.py
imports: from typing import Optional
  import torch
  from .None import FairseqDataset
label_desc: Use image node_id 1 to create a new TransformEosLangPairDataset object from inherited base classes: FairseqDataset with example: obj = TransformEosLangPairDataset(dataset, src_eos, new_src_eos, tgt_bos, new_tgt_bos)