class_docstr: Sequence to Sequence Dataset in memory.
class_docstr_tok: ["Sequence","to","Sequence","Dataset","in","memory","."]
code: def _get_examples(self):
      self.examples = []
      with open(self.src_file_name, encoding="utf8") as f_src, open(
          self.tgt_file_name, encoding="utf8"
      ) as f_tgt:
          for i, (src, tgt) in enumerate(zip(f_src, f_tgt)):
              if i % 10000 == 0 and i != 0:
                  logging.info(
                      f"Read {i} lines from {self.src_file_name} & {self.tgt_file_name}"
                  )
              src = self.src_tokenizer.text_to_ids(src.strip())
              if self.add_bos_to_input:
                  src = [
                      self.src_tokenizer.pad_id
                      if self.replace_bos_with_pad
                      else self.src_tokenizer.bos_id
                  ] + src
              if self.add_eos_to_input:
                  src = src + [self.src_tokenizer.eos_id]
  
              tgt = (
                  [
                      self.tgt_tokenizer.pad_id
                      if self.replace_bos_with_pad
                      else self.tgt_tokenizer.bos_id
                  ]
                  + self.tgt_tokenizer.text_to_ids(tgt.strip())
                  + [self.tgt_tokenizer.eos_id]
              )
              # Truncate to max sequence length.
              if len(src) > self.max_src_seq_length:
                  src = src[-self.max_src_seq_length + 1 :]
              if len(tgt) > self.max_tgt_seq_length:
                  tgt = tgt[-self.max_tgt_seq_length + 1 :]
              self.examples.append({"src": src, "tgt": tgt})
  
      logging.info(f"Dataset Length : {len(self.examples)}")
  
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 5 for calling the SequenceToSequenceDataset obj's underlying member method code with example usage: obj._get_examples() without return types