class_docstr: Truncate a sequence by returning the first truncation_length tokens
code: def __init__(self, dataset, truncation_length):
      super().__init__(dataset)
      assert truncation_length is not None
      self.truncation_length = truncation_length
      self.dataset = dataset
  
file_path: fairseq/fairseq/data/shorten_dataset.py
imports: import numpy
  from fairseq.data import data_utils
  from .None import BaseWrapperDataset
label_desc: Use image node_id 1 to create a new TruncateDataset object from inherited base classes: BaseWrapperDataset with example: obj = TruncateDataset(dataset, truncation_length)