class_docstr: Break a Dataset of tokens into blocks.
  
  Args:
      dataset (~torch.utils.data.Dataset): dataset to break into blocks
      sizes (List[int]): sentence lengths (required for 'complete' and 'eos')
      block_size (int): maximum block size (ignored in 'eos' break mode)
      break_mode (str, optional): Mode used for breaking tokens. Values can
          be one of:
          - 'none': break tokens into equally sized blocks (up to block_size)
          - 'complete': break tokens into blocks (up to block_size) such that
              blocks contains complete sentences, although block_size may be
              exceeded if some sentences exceed block_size
          - 'complete_doc': similar to 'complete' mode, but do not
              cross document boundaries
          - 'eos': each block contains one sentence (block_size is ignored)
      include_targets (bool, optional): return next tokens as targets
          (default: False).
      document_sep_len (int, optional): document separator size (required for
          'complete_doc' break mode). Typically 1 if the sentences have eos
          and 0 otherwise.
class_docstr_tok: ["Break","a","Dataset","of","tokens","into","blocks",".","Args",":","dataset","(","~torch.utils.data.Dataset",")",":","dataset","to","break","into","blocks","sizes","(","List","[","int","]",")",":","sentence","lengths","(","required","for","'complete","'","and","'eos","'",")","block_size","(","int",")",":","maximum","block","size","(","ignored","in","'eos","'","break","mode",")","break_mode","(","str",",","optional",")",":","Mode","used","for","breaking","tokens",".","Values","can","be","one","of",":","-","'none","'",":","break","tokens","into","equally","sized","blocks","(","up","to","block_size",")","-","'complete","'",":","break","tokens","into","blocks","(","up","to","block_size",")","such","that","blocks","contains","complete","sentences",",","although","block_size","may","be","exceeded","if","some","sentences","exceed","block_size","-","'complete_doc","'",":","similar","to","'complete","'","mode",",","but","do","not","cross","document","boundaries","-","'eos","'",":","each","block","contains","one","sentence","(","block_size","is","ignored",")","include_targets","(","bool",",","optional",")",":","return","next","tokens","as","targets","(","default",":","False",")",".","document_sep_len","(","int",",","optional",")",":","document","separator","size","(","required","for","'complete_doc","'","break","mode",")",".","Typically","1","if","the","sentences","have","eos","and","0","otherwise","."]
code: def __len__(self):
      return len(self.slice_indices)
  
file_path: fairseq/fairseq/data/token_block_dataset.py
imports: import numpy
  import torch
  from fairseq.data import FairseqDataset, plasma_utils
  from fairseq.data.indexed_dataset import best_fitting_int_dtype
  from typing import Tuple
label_desc: Use image node_id 8 for calling the TokenBlockDataset obj's underlying member method code with example usage: obj.__len__() and returns: len