code: def _build_keras_model() -> keras.Model:
      """Creates a LSTM Keras model for classifying imdb data.
  
      Reference: https://www.tensorflow.org/tutorials/text/text_classification_rnn
  
      Returns:
        A Keras Model.
      """
      # The model below is built with Sequential API, please refer to
      # https://www.tensorflow.org/guide/keras/sequential_model
      model = keras.Sequential(
          [
              keras.layers.Embedding(
                  _VOCAB_SIZE + 2,
                  _EMBEDDING_UNITS,
                  name=_transformed_name(_FEATURE_KEY),
              ),
              keras.layers.Bidirectional(
                  keras.layers.LSTM(_LSTM_UNITS, dropout=_DROPOUT_RATE)
              ),
              keras.layers.Dense(_HIDDEN_UNITS, activation="relu"),
              keras.layers.Dense(1),
          ]
      )
  
      model.compile(
          loss=keras.losses.BinaryCrossentropy(from_logits=True),
          optimizer=keras.optimizers.Adam(_LEARNING_RATE),
          metrics=["accuracy"],
      )
  
      model.summary(print_fn=absl.logging.info)
      return model
  
file_path: tfx/tfx/examples/imdb/imdb_utils_native_keras.py
imports: from typing import List
  import absl
  import tensorflow
  from tensorflow import keras
  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 5 for calling a global function with example usage: _build_keras_model() and returns: model