class_docstr: Tests variable utterance text data class.
      
code: def _run_and_test(self, hparams):
      # Construct database
      text_data = tx.data.MonoTextData(hparams)
      self.assertEqual(
          text_data.vocab.size,
          self._vocab_size + len(text_data.vocab.special_tokens),
      )
  
      iterator = text_data.dataset.make_initializable_iterator()
      text_data_batch = iterator.get_next()
  
      with self.test_session() as sess:
          sess.run(tf.global_variables_initializer())
          sess.run(tf.local_variables_initializer())
          sess.run(tf.tables_initializer())
          sess.run(iterator.initializer)
  
          while True:
              try:
                  # Run the logics
                  data_batch_ = sess.run(text_data_batch)
  
                  self.assertEqual(
                      set(data_batch_.keys()),
                      set(text_data.list_items()),
                  )
  
                  # Test utterance count
                  utt_ind = np.sum(data_batch_["text_ids"], 2) != 0
                  utt_cnt = np.sum(utt_ind, 1)
                  self.assertListEqual(
                      data_batch_[
                          text_data.utterance_cnt_name
                      ].tolist(),
                      utt_cnt.tolist(),
                  )
  
                  if text_data.hparams.dataset.pad_to_max_seq_length:
                      max_l = text_data.hparams.dataset.max_seq_length
                      max_l += text_data._decoder.added_length
                      for x in data_batch_["text"]:
                          for xx in x:
                              self.assertEqual(len(xx), max_l)
                      for x in data_batch_["text_ids"]:
                          for xx in x:
                              self.assertEqual(len(xx), max_l)
  
              except tf.errors.OutOfRangeError:
                  print("Done -- epoch limit reached")
                  break
  
imports: import tempfile
  import copy
  import numpy
  import tensorflow
  import texar.tf
label_desc: Use image node_id 2 for calling the VarUttMonoTextDataTest obj's underlying member method code with example usage: obj._run_and_test(hparams) without return types