code: def testNGramsBagOfWordsEmpty(self):
      with tf.compat.v1.Graph().as_default():
          string_tensor = tf.constant([], dtype=tf.string)
          tokenized_tensor = tf.compat.v1.string_split(
              string_tensor, delimiter=""
          )
          ngrams = mappers.ngrams(
              tokenized_tensor, (1, 2), separator=""
          )
          bow = mappers.bag_of_words(
              tokenized_tensor, (1, 2), separator=""
          )
          with tf.compat.v1.Session():
              ngrams_output = ngrams.eval()
              bow_output = bow.eval()
              self.assertAllEqual(ngrams_output.values, [])
              self.assertAllEqual(bow_output.values, [])
              self.assertAllEqual(ngrams_output.dense_shape, [0, 0])
              self.assertAllEqual(bow_output.dense_shape, [0, 0])
  
imports: import numpy
  import tensorflow
  from tensorflow_transform import mappers
  from tensorflow_transform import test_case
label_desc: Use image node_id 10 for calling the MappersTest obj's underlying member method code with example usage: obj.testNGramsBagOfWordsEmpty() without return types