code: def testNGramsWithRepeatedTokensPerRow(self):
      with tf.compat.v1.Graph().as_default():
          string_tensor = tf.constant(
              ["Cats or dogs or bunnies", "Cats not rats"]
          )
          tokenized_tensor = tf.compat.v1.strings.split(
              string_tensor, sep=" "
          )
          output_tensor = mappers.ngrams(
              tokens=tokenized_tensor, ngram_range=(1, 1), separator=" "
          )
          with tf.compat.v1.Session():
              output = output_tensor.eval()
              self.assertAllEqual(
                  output.indices,
                  [
                      [0, 0],
                      [0, 1],
                      [0, 2],
                      [0, 3],
                      [0, 4],
                      [1, 0],
                      [1, 1],
                      [1, 2],
                  ],
              )
              # Note: the ngram "or" is represented twice for the first document.
              self.assertAllEqual(
                  output.values,
                  [
                      b"Cats",
                      b"or",
                      b"dogs",
                      b"or",
                      b"bunnies",
                      b"Cats",
                      b"not",
                      b"rats",
                  ],
              )
              self.assertAllEqual(output.dense_shape, [2, 5])
  
imports: import numpy
  import tensorflow
  from tensorflow_transform import mappers
  from tensorflow_transform import test_case
label_desc: Use image node_id 8 for calling the MappersTest obj's underlying member method code with example usage: obj.testNGramsWithRepeatedTokensPerRow() without return types