class_docstr: A wrapper around torch.utils.data.Dataset for monolingual data.
  
  Args:
      dataset (torch.utils.data.Dataset): dataset to wrap
      sizes (List[int]): sentence lengths
      vocab (~fairseq.data.Dictionary): vocabulary
      shuffle (bool, optional): shuffle the elements before batching
          (default: True).
class_docstr_tok: ["A","wrapper","around","torch.utils.data.Dataset","for","monolingual","data",".","Args",":","dataset","(","torch.utils.data.Dataset",")",":","dataset","to","wrap","sizes","(","List","[","int","]",")",":","sentence","lengths","vocab","(","~fairseq.data.Dictionary",")",":","vocabulary","shuffle","(","bool",",","optional",")",":","shuffle","the","elements","before","batching","(","default",":","True",")","."]
docstr: Return an example's size as a float or tuple. This value is used when
  filtering a dataset with ``--max-positions``.
docstr_tok: ["Return","an","example","'s","size","as","a","float","or","tuple",".","This","value","is","used","when","filtering","a","dataset","with","``","--","max-positions","``","."]
code: def size(self, index):
      """Return an example's size as a float or tuple. This value is used when
      filtering a dataset with ``--max-positions``."""
      return self.sizes[index]
  
file_path: fairseq/fairseq/data/monolingual_dataset.py
imports: import numpy
  import torch
  from .None import FairseqDataset, data_utils
label_desc: Use image node_id 10 for calling the MonolingualDataset obj's underlying member method code with example usage: obj.size(index) and returns: self