code: def testText2TextTmpDir(self):
      problem = Test1()
      problem.generate_data(self.tmp_dir, self.tmp_dir)
      vocab_file = os.path.join(self.tmp_dir, "vocab.test1.3.subwords")
      train_file = os.path.join(
          self.tmp_dir, "test1-train-00000-of-00001"
      )
      eval_file = os.path.join(self.tmp_dir, "test1-dev-00000-of-00001")
      self.assertTrue(tf.gfile.Exists(vocab_file))
      self.assertTrue(tf.gfile.Exists(train_file))
      self.assertTrue(tf.gfile.Exists(eval_file))
  
      dataset = problem.dataset(
          tf_estimator.ModeKeys.TRAIN, self.tmp_dir
      )
      features = dataset.make_one_shot_iterator().get_next()
  
      examples = []
      exhausted = False
      with self.test_session() as sess:
          examples.append(sess.run(features))
          examples.append(sess.run(features))
          try:
              sess.run(features)
          except tf.errors.OutOfRangeError:
              exhausted = True
  
      self.assertTrue(exhausted)
      self.assertEqual(2, len(examples))
  
      self.assertNotEqual(
          list(examples[0]["inputs"]), list(examples[1]["inputs"])
      )
  
      example = examples[0]
      encoder = text_encoder.SubwordTextEncoder(vocab_file)
      inputs_encoded = list(example["inputs"])
      inputs_encoded.pop()  # rm EOS
      self.assertTrue(encoder.decode(inputs_encoded) in self.inputs)
      targets_encoded = list(example["targets"])
      targets_encoded.pop()  # rm EOS
      self.assertTrue(encoder.decode(targets_encoded) in self.targets)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import shutil
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 9 for calling the TextProblems obj's underlying member method code with example usage: obj.testText2TextTmpDir() without return types