class_docstr: Dataset class for translation task.
  By default, the source language shares the same vocabulary with the target language.
class_docstr_tok: ["Dataset","class","for","translation","task",".","By","default",",","the","source","language","shares","the","same","vocabulary","with","the","target","language","."]
docstr: get raw sequence in dataset by specifying index, mode(train/valid/test), field(src/tgt)
docstr_tok: ["get","raw","sequence","in","dataset","by","specifying","index",",","mode","(","train\/valid\/test",")",",","field","(","src\/tgt",")"]
code: def get_seq_by_id(self, idx, mode="train", field="src"):
      "get raw sequence in dataset by specifying index, mode(train/valid/test), field(src/tgt)"
      if field == "src":
          return self.src[mode][idx].strip().split()
      else:
          return (
              [self.INIT_TOKEN]
              + self.tgt[mode][idx].strip().split()
              + [self.EOS_TOKEN]
          )
  
file_path: dgl/examples/pytorch/transformer/dataset/__init__.py
imports: import os
  import random
  from .fields import *
  from .graph import *
  from .utils import prepare_dataset
label_desc: Use image node_id 2 for calling the TranslationDataset obj's underlying member method code with example usage: obj.get_seq_by_id(idx, mode, field) and returns: self, unknown