class_docstr: Tests utility functions.
      
docstr: Tests :func:`texar.tf.utils.map_ids_to_strs`.
          
docstr_tok: ["Tests",":","func",":","`","texar.tf.utils.map_ids_to_strs","`","."]
code: def test_map_ids_to_strs(self):
      """Tests :func:`texar.tf.utils.map_ids_to_strs`."""
      vocab_list = ["word", "词"]
      vocab_file = tempfile.NamedTemporaryFile()
      vocab_file.write("\n".join(vocab_list).encode("utf-8"))
      vocab_file.flush()
      vocab = Vocab(vocab_file.name)
  
      text = [
          ["<BOS>", "word", "词", "<EOS>", "<PAD>"],
          ["word", "词", "word", "词", "<PAD>"],
      ]
      text = np.asarray(text)
      ids = vocab.map_tokens_to_ids_py(text)
  
      ids = ids.tolist()
      text_ = utils.map_ids_to_strs(ids, vocab)
  
      self.assertEqual(text_[0], "word 词")
      self.assertEqual(text_[1], "word 词 word 词")
  
file_path: texar/tests/utils/utils_test.py
imports: import tempfile
  import numpy
  import tensorflow
  from texar.tf.utils import utils
  from texar.tf.data.vocabulary import Vocab
label_desc: Use image node_id 8 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_map_ids_to_strs() without return types