class_docstr: ```
  Wrapper for Transformer datasets.
  ```
class_docstr_tok: ["``","`","Wrapper","for","Transformer","datasets",".","``","`"]
code: def __getitem__(self, idx):
      batch_x = self.x[
          idx * self.batch_size : (idx + 1) * self.batch_size
      ]
      batch_y = self.y[
          idx * self.batch_size : (idx + 1) * self.batch_size
      ]
      return (batch_x, batch_y)
  
file_path: ktrain/ktrain/text/dataset.py
imports: from ..dataset import SequenceDataset
  from ..imports import *
label_desc: Use image node_id 2 for calling the TransformerDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: batch_x,  batch_y