class_docstr: A `DataLoader` suitable for language modeling
class_docstr_tok: ["A","`","DataLoader","`","suitable","for","language","modeling"]
code: def create_item(self, seq):
      if seq is None:
          seq = 0
      if seq >= self.n:
          raise IndexError
      sl = (
          self.last_len
          if seq // self.bs == self.n_batches - 1
          else self.seq_len
      )
      st = (seq % self.bs) * self.bl + (seq // self.bs) * self.seq_len
      txt = self.chunks[st : st + sl + 1]
      return LMTensorText(txt[:-1]), txt[1:]
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  from .core import *
label_desc: Use image node_id 4 for calling the LMDataLoader obj's underlying member method code with example usage: obj.create_item(seq) and returns: LMTensorText,  txt