docstr: Checks TFLite conversion and inference.
code: def testTfLite(self):
      """Checks TFLite conversion and inference."""
  
      class NgramModel(tf.keras.Model):
          def call(self, input_tensor, **kwargs):
              return ngrams_op.ngrams(
                  input_tensor,
                  width=2,
                  axis=-1,
                  reduction_type=ngrams_op.Reduction.STRING_JOIN,
                  string_separator="|",
              )
  
      # Test input data.
      input_data = np.array(["a", "b", "c"])
  
      # Define a Keras model.
      model = NgramModel()
      # Do TF.Text inference.
      tf_result = model(tf.constant(input_data))
  
      # Convert to TFLite.
      converter = tf.lite.TFLiteConverter.from_keras_model(model)
      converter.target_spec.supported_ops = [
          tf.lite.OpsSet.TFLITE_BUILTINS
      ]
      converter.allow_custom_ops = True
      tflite_model = converter.convert()
  
      # Do TFLite inference.
      op = tflite_registrar.AddNgramsStringJoin
      interp = interpreter.InterpreterWithCustomOps(
          model_content=tflite_model, custom_op_registerers=[op]
      )
      input_details = interp.get_input_details()
      interp.resize_tensor_input(
          input_details[0]["index"], tf.shape(input_data)
      )
      interp.allocate_tensors()
      interp.set_tensor(input_details[0]["index"], input_data)
      interp.invoke()
      output_details = interp.get_output_details()
      tflite_result = interp.get_tensor(output_details[0]["index"])
  
      # Assert the results are identical.
      self.assertAllEqual(tflite_result, tf_result)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  import tensorflow_text
  from tensorflow.lite.python import interpreter
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import test
  from tensorflow_text.core.pybinds import tflite_registrar
  from tensorflow_text.python.ops import ngrams_op
label_desc: Use image node_id 20 for calling the NgramsV2OpTest obj's underlying member method code with example usage: obj.testTfLite() and returns: ngrams_op