code: def testCombinedKerasPreprocessingLayers(self):
      if not tf.executing_eagerly():
          self.skipTest("This test is TF2 only.")
  
      inputs = {}
      features = {}
      tensors = {}
      specs = {}
      expected_dim = 0
  
      indicator_key = "indicator_key"
      vocab_list = [2, 3, 4]
      inputs[indicator_key] = tf.keras.Input(
          shape=(1,), dtype=tf.dtypes.int32, name=indicator_key
      )
      features[indicator_key] = tf.keras.layers.IntegerLookup(
          vocabulary=vocab_list,
          num_oov_indices=0,
          output_mode="multi_hot",
      )(inputs[indicator_key])
      state_input = [3, 2, 2, 4, 3]
      tensors[indicator_key] = tf.expand_dims(state_input, -1)
      specs[indicator_key] = tensor_spec.TensorSpec([1], tf.int32)
      expected_dim += len(vocab_list)
  
      embedding_key = "embedding_key"
      embedding_dim = 3
      vocab_list = [2, 3, 4]
      inputs[embedding_key] = tf.keras.Input(
          shape=(1,), dtype=tf.dtypes.int32, name=embedding_key
      )
      id_input = tf.keras.layers.IntegerLookup(
          vocabulary=vocab_list, num_oov_indices=0
      )(inputs[embedding_key])
      embedding_input = tf.keras.layers.Embedding(
          input_dim=len(vocab_list), output_dim=embedding_dim
      )(id_input)
      features[embedding_key] = tf.reduce_sum(embedding_input, axis=-2)
      state_input = [3, 2, 2, 4, 3]
      tensors[embedding_key] = tf.expand_dims(state_input, -1)
      specs[embedding_key] = tensor_spec.TensorSpec([1], tf.int32)
      expected_dim += embedding_dim
  
      numeric_key = "numeric_key"
      batch_size = 5
      state_dims = 3
      input_shape = (batch_size, state_dims)
      inputs[numeric_key] = tf.keras.Input(
          shape=[state_dims], dtype=tf.float32, name=numeric_key
      )
      features[numeric_key] = inputs[numeric_key]
      tensors[numeric_key] = tf.ones(input_shape, tf.float32)
      specs[numeric_key] = tensor_spec.TensorSpec(
          [state_dims], tf.float32
      )
      expected_dim += state_dims
      features = tf.keras.layers.concatenate(features.values(), axis=-1)
  
      # TODO(b/170645185): Replace Model with FunctionalPreprocessingStage.
      network = encoding_network.EncodingNetwork(
          specs,
          preprocessing_combiner=tf.keras.Model(
              inputs=inputs, outputs=features
          ),
      )
      output, _ = network(tensors)
      expected_shape = (batch_size, expected_dim)
      self.assertEqual(expected_shape, output.shape)
  
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 tf_agents.networks import encoding_network
  from tf_agents.specs import tensor_spec
  from tf_agents.utils import test_utils
label_desc: Use image node_id 15 for calling the EncodingNetworkTest obj's underlying member method code with example usage: obj.testCombinedKerasPreprocessingLayers() without return types