code: def testCompileData(self):
      filename = "out"
      filepath = os.path.join(self.tmp_dir, filename)
      translate.compile_data(self.tmp_dir, self.DATASETS, filename)
  
      count = 0
      for i, example in enumerate(
          text_problems.text2text_txt_iterator(
              filepath + ".lang1", filepath + ".lang2"
          )
      ):
          expected = self.data[i]
          self.assertEqual(
              list(expected), [example["inputs"], example["targets"]]
          )
          count += 1
      self.assertEqual(count, len(self.data))
  
file_path: tensor2tensor/tensor2tensor/data_generators/translate_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import shutil
  import tarfile
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.data_generators import translate
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the TranslateTest obj's underlying member method code with example usage: obj.testCompileData() without return types