class_docstr: Abstract class for TextMemmapSequenceToSequenceDataset and BinarizedMemmapSequenceToSequenceDataset.
  This class is not meant to be used standalone and just as an abstract class for the two subclasses.
class_docstr_tok: ["Abstract","class","for","TextMemmapSequenceToSequenceDataset","and","BinarizedMemmapSequenceToSequenceDataset",".","This","class","is","not","meant","to","be","used","standalone","and","just","as","an","abstract","class","for","the","two","subclasses","."]
code: def _get_sample(self, idx):
      if isinstance(idx, np.int64):
          idx = idx.item()
  
      if self.samples_mapping is not None:
          assert idx < len(self.samples_mapping)
          idx, _, _ = self.samples_mapping[idx]
          if isinstance(idx, np.uint32):
              idx = idx.item()
  
      assert idx < len(self.src_indexed_dataset)
      src = self.src_indexed_dataset[idx]
      tgt = self.tgt_indexed_dataset[idx]
  
      return src, tgt
  
imports: import os
  import numpy
  import torch
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.collections.nlp.data.language_modeling.megatron.dataset_utils import get_indexed_dataset_, get_samples_mapping
  from nemo.collections.nlp.data.language_modeling.text_memmap_dataset import TextMemMapDataset
  from nemo.core.classes import Dataset
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling the IndexedSequenceToSequenceDataset obj's underlying member method code with example usage: obj._get_sample(idx) and returns: src,  tgt