class_docstr: Defines an iterator for language modeling tasks that use BPTT.
  
  Provides contiguous streams of examples together with targets that are
  one timestep further forward, for language modeling training with
  backpropagation through time (BPTT). Expects a Dataset with a single
  example and a single field called 'text' and produces Batches with text and
  target attributes.
  
  All batches will have sizes [batch_size, bptt_len]
  
  Attributes:
      dataset: The Dataset object to load Examples from.
      batch_size: Batch size.
      bptt_len: Length of sequences for backpropagation through time.
      sort_key: A key to use for sorting examples in order to batch together
          examples with similar lengths and minimize padding. The sort_key
          provided to the Iterator constructor overrides the sort_key
          attribute of the Dataset, or defers to it if None.
      train: Whether the iterator represents a train set.
      repeat: Whether to repeat the iterator for multiple epochs.
      shuffle: Whether to shuffle examples between epochs.
      sort: Whether to sort examples according to self.sort_key.
          Note that repeat, shuffle, and sort default to train, train, and
          (not train).
      device: Device to create batches on. Use -1 for CPU and None for the
          currently active GPU device.
class_docstr_tok: ["Defines","an","iterator","for","language","modeling","tasks","that","use","BPTT",".","Provides","contiguous","streams","of","examples","together","with","targets","that","are","one","timestep","further","forward",",","for","language","modeling","training","with","backpropagation","through","time","(","BPTT",")",".","Expects","a","Dataset","with","a","single","example","and","a","single","field","called","'text","'","and","produces","Batches","with","text","and","target","attributes",".","All","batches","will","have","sizes","[","batch_size",",","bptt_len","]","Attributes",":","dataset",":","The","Dataset","object","to","load","Examples","from",".","batch_size",":","Batch","size",".","bptt_len",":","Length","of","sequences","for","backpropagation","through","time",".","sort_key",":","A","key","to","use","for","sorting","examples","in","order","to","batch","together","examples","with","similar","lengths","and","minimize","padding",".","The","sort_key","provided","to","the","Iterator","constructor","overrides","the","sort_key","attribute","of","the","Dataset",",","or","defers","to","it","if","None",".","train",":","Whether","the","iterator","represents","a","train","set",".","repeat",":","Whether","to","repeat","the","iterator","for","multiple","epochs",".","shuffle",":","Whether","to","shuffle","examples","between","epochs",".","sort",":","Whether","to","sort","examples","according","to","self.sort_key",".","Note","that","repeat",",","shuffle",",","and","sort","default","to","train",",","train",",","and","(","not","train",")",".","device",":","Device","to","create","batches","on",".","Use","-1","for","CPU","and","None","for","the","currently","active","GPU","device","."]
code: def __len__(self):
      return math.floor(
          (len(self.dataset[0].text) / self.batch_size - 1)
          / self.bptt_len
      )
  
imports: import math
  from torchtext.data import BPTTIterator, Dataset, Batch
label_desc: Use image node_id 1 for calling the BatchFirstBPTTIterator obj's underlying member method code with example usage: obj.__len__() and returns: math