class_docstr: Subsamples a given dataset by a specified ratio. Subsampling is done on the number of examples
  
  Args:
      dataset (~torch.utils.data.Dataset): dataset to subsample
      size_ratio(float): the ratio to subsample to. must be between 0 and 1 (exclusive)
class_docstr_tok: ["Subsamples","a","given","dataset","by","a","specified","ratio",".","Subsampling","is","done","on","the","number","of","examples","Args",":","dataset","(","~torch.utils.data.Dataset",")",":","dataset","to","subsample","size_ratio","(","float",")",":","the","ratio","to","subsample","to",".","must","be","between","0","and","1","(","exclusive",")"]
code: def size(self, index):
      return self.dataset.size(self.indices[index])
  
file_path: fairseq/fairseq/data/subsample_dataset.py
imports: import contextlib
  import logging
  import numpy
  from fairseq.data.data_utils import numpy_seed
  from .None import BaseWrapperDataset
label_desc: Use image node_id 8 for calling the SubsampleDataset obj's underlying member method code with example usage: obj.size(index) and returns: self