code: def _wide_and_deep_classifier(
      wide_columns, deep_columns, dnn_hidden_units
  ):
      """Build a simple keras wide and deep model.
  
      Args:
        wide_columns: Feature columns wrapped in indicator_column for wide (linear)
          part of the model.
        deep_columns: Feature columns for deep part of the model.
        dnn_hidden_units: [int], the layer sizes of the hidden DNN.
  
      Returns:
        A Wide and Deep Keras model
      """
      # Following values are hard coded for simplicity in this example,
      # However prefarably they should be passsed in as hparams.
  
      # Keras needs the feature definitions at compile time.
      # TODO(b/139081439): Automate generation of input layers from FeatureColumn.
      input_layers = {
          colname: tf.keras.layers.Input(
              name=colname, shape=(), dtype=tf.float32
          )
          for colname in _transformed_names(_DENSE_FLOAT_FEATURE_KEYS)
      }
      input_layers.update(
          {
              colname: tf.keras.layers.Input(
                  name=colname, shape=(), dtype="int32"
              )
              for colname in _transformed_names(_VOCAB_FEATURE_KEYS)
          }
      )
      input_layers.update(
          {
              colname: tf.keras.layers.Input(
                  name=colname, shape=(), dtype="int32"
              )
              for colname in _transformed_names(_BUCKET_FEATURE_KEYS)
          }
      )
      input_layers.update(
          {
              colname: tf.keras.layers.Input(
                  name=colname, shape=(), dtype="int32"
              )
              for colname in _transformed_names(
                  _CATEGORICAL_FEATURE_KEYS
              )
          }
      )
  
      # TODO(b/161952382): Replace with Keras premade models and
      # Keras preprocessing layers.
      deep = tf.keras.layers.DenseFeatures(deep_columns)(input_layers)
      for numnodes in dnn_hidden_units:
          deep = tf.keras.layers.Dense(numnodes)(deep)
      wide = tf.keras.layers.DenseFeatures(wide_columns)(input_layers)
  
      output = tf.keras.layers.Dense(1, activation="sigmoid")(
          tf.keras.layers.concatenate([deep, wide])
      )
      output = tf.squeeze(output, -1)
  
      model = tf.keras.Model(input_layers, output)
      model.compile(
          loss="binary_crossentropy",
          optimizer=tf.keras.optimizers.Adam(lr=0.001),
          metrics=[tf.keras.metrics.BinaryAccuracy()],
      )
      model.summary(print_fn=logging.info)
      return model
  
file_path: tfx/tfx/examples/chicago_taxi_pipeline/taxi_utils_native_keras.py
imports: from typing import List
  from absl import logging
  import tensorflow
  import tensorflow_transform
  from tfx.components.trainer.fn_args_utils import DataAccessor
  from tfx.components.trainer.fn_args_utils import FnArgs
  from tfx_bsl.tfxio import dataset_options
label_desc: Use image node_id 8 for calling a global function with example usage: _wide_and_deep_classifier(wide_columns, deep_columns, dnn_hidden_units) and returns: model