class_docstr: Memory-mapped text sequence to sequence dataset. Operates on raw text files and tokenizes the text on-the-fly.
class_docstr_tok: ["Memory-mapped","text","sequence","to","sequence","dataset",".","Operates","on","raw","text","files","and","tokenizes","the","text","on-the-fly","."]
code: def _get_examples(self):
      self.src_indexed_dataset = TextMemMapDataset(
          dataset_paths=[self.src_file_name],
          tokenizer=self.src_tokenizer,
          header_lines=0,
      )
      self.tgt_indexed_dataset = TextMemMapDataset(
          dataset_paths=[self.tgt_file_name],
          tokenizer=self.tgt_tokenizer,
          header_lines=0,
      )
  
      assert len(self.src_indexed_dataset) == len(
          self.tgt_indexed_dataset
      ), "src and tgt has different number of lines"
      self._build_samples_mapping()
  
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 2 for calling the TextMemmapSequenceToSequenceDataset obj's underlying member method code with example usage: obj._get_examples() without return types