class_docstr: Tests utility functions.
      
docstr: Tests :func:`texar.tf.utils.strip_bos`
          
docstr_tok: ["Tests",":","func",":","`","texar.tf.utils.strip_bos","`"]
code: def test_strip_bos(self):
      """Tests :func:`texar.tf.utils.strip_bos`"""
      str_ = "<BOS> i am"
      self.assertEqual(utils.strip_bos(str_, "<BOS>"), "i am")
      self.assertEqual(utils.strip_bos(str_, ""), "<BOS> i am")
      self.assertEqual(utils.strip_bos([str_], "<BOS>"), ["i am"])
  
      str_ = str_.split()
      self.assertEqual(
          utils.strip_bos(str_, "<BOS>", is_token_list=True),
          ["i", "am"],
      )
      self.assertEqual(
          utils.strip_bos([str_], "<BOS>", is_token_list=True),
          [["i", "am"]],
      )
  
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 3 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_strip_bos() without return types