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``."""
      if len(self.sizes) == 1:
          return self.sizes[0][index]
      else:
          return (s[index] for s in self.sizes)
  
file_path: fairseq/fairseq/data/nested_dictionary_dataset.py
imports: from collections import OrderedDict
  import torch
  from torch.utils.data.dataloader import default_collate
  from .None import FairseqDataset
label_desc: Use image node_id 6 for calling the NestedDictionaryDataset obj's underlying member method code with example usage: obj.size(index) and returns: self, unknown