class_docstr: Sequence to Sequence Dataset in memory.
  Similar to SequenceToSequenceDataset but with the same input format as GPTSFTDataset
class_docstr_tok: ["Sequence","to","Sequence","Dataset","in","memory",".","Similar","to","SequenceToSequenceDataset","but","with","the","same","input","format","as","GPTSFTDataset"]
code: def __getitem__(self, idx):
      example = self.indexed_dataset[idx]
      text_enc = self._process_src(example["input"])
      tgt = self._process_tgt(example["output"])
      text_dec = tgt[:-1]
      labels = tgt[1:]
      return {
          "text_enc": text_enc,
          "text_dec": text_dec,
          "labels": labels,
      }
  
file_path: NeMo/nemo/collections/nlp/data/language_modeling/megatron/t5_sft_dataset.py
imports: import json
  import os
  from typing import Optional
  import numpy
  import torch
  from datasets import load_dataset
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.collections.nlp.data.language_modeling.text_memmap_dataset import JSONLMemMapDataset
  from nemo.core.classes import Dataset
  from nemo.utils import logging
label_desc: Use image node_id 5 for calling the T5SFTDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: dict