code: def __init__(
      self,
      *,
      text: str,
      dataset: TextDataset,
      batch_size: int,
      seq_len: int,
  ):
      self.seq_len = seq_len
      data = dataset.text_to_i(text)
      n_batch = data.shape[0] // batch_size
      data = data.narrow(0, 0, n_batch * batch_size)
      data = data.view(batch_size, -1).t().contiguous()
      self.data = data
  
imports: import random
  from pathlib import PurePath, Path
  from typing import List, Callable, Dict, Optional
  import torch
  from torch.utils.data import IterableDataset, Dataset
  from labml import monit
  from labml.utils.download import download_file
label_desc: Use image node_id 1 to create a new SequentialDataLoader object from inherited base classes: IterableDataset with example: obj = SequentialDataLoader()