code: def test_noising_dataset_with_eos(self):
      (
          src_dict,
          src_tokens,
          _,
      ) = self._get_test_data_with_bpe_cont_marker(append_eos=True)
  
      # Format data for src_dataset
      src_tokens = torch.t(src_tokens)
      src_tokens_no_pad = []
      for src_sentence in src_tokens:
          src_tokens_no_pad.append(
              utils.strip_pad(tensor=src_sentence, pad=src_dict.pad())
          )
      denoising_batch_result = self._get_noising_dataset_batch(
          src_tokens_no_pad=src_tokens_no_pad, src_dict=src_dict
      )
  
      eos, pad = src_dict.eos(), src_dict.pad()
  
      # Generated noisy source as source
      expected_src = torch.LongTensor(
          [
              [4, 5, 10, 11, 8, 12, 13, eos],
              [pad, pad, pad, 6, 8, 9, 7, eos],
          ]
      )
      # Original clean source as target (right-padded)
      expected_tgt = torch.LongTensor(
          [
              [4, 5, 10, 11, 8, 12, 13, eos],
              [6, 7, 8, 9, eos, pad, pad, pad],
          ]
      )
      generated_src = denoising_batch_result["net_input"]["src_tokens"]
      tgt_tokens = denoising_batch_result["target"]
  
      self.assertTensorEqual(expected_src, generated_src)
      self.assertTensorEqual(expected_tgt, tgt_tokens)
  
imports: import unittest
  from typing import Dict, List
  import torch
  import tests.utils
  from fairseq import utils
  from fairseq.data import Dictionary, LanguagePairDataset, TransformEosDataset, data_utils, noising
label_desc: Use image node_id 20 for calling the TestDataNoising obj's underlying member method code with example usage: obj.test_noising_dataset_with_eos() without return types