code: def test_whitespace_tokenization_layer(
      self,
      input_data,
      expected_output,
      input_shape=(None,),
      pad_value=None,
      squeeze_token_dim=True,
  ):
      if not tf.executing_eagerly() and not isinstance(
          input_data, np.ndarray
      ):
          # In TF1 list-of-lists-of-scalars need to be wrapped in an extra list
          # for single-io models, because it tries to disambiguate which
          # input to send an input to (which causes issues w/ single io models)
          input_data = [input_data]
  
      # create a functional API model
      i = tf.keras.layers.Input(shape=input_shape, dtype=tf.string)
      layer = tokenization_layers.WhitespaceTokenizer(
          pad_value=pad_value, squeeze_token_dim=squeeze_token_dim
      )
      o = layer(i)
      model = tf.keras.models.Model(i, o)
      self.assertAllEqual(model.predict(input_data), expected_output)
  
file_path: text/tensorflow_text/python/keras/layers/tokenization_layers_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_text.python.keras.layers import tokenization_layers
label_desc: Use image node_id 2 for calling the TokenizationLayersTest obj's underlying member method code with example usage: obj.test_whitespace_tokenization_layer(input_data, expected_output, input_shape, pad_value, squeeze_token_dim) without return types