code: def _build_keras_model() -> keras.Model:
      """Creates a Keras model for predicting the next page.
  
      Returns:
        A Keras Model.
      """
      # This model has two inputs: (i) current page and (ii) session index.
      cur_page_input = keras.Input(shape=(), name=_CUR_PAGE_FEATURE_KEY)
      session_index_input = keras.Input(
          shape=(1,), name=_SESSION_INDEX_FEATURE_KEY
      )
      inputs = [cur_page_input, session_index_input]
  
      # Create an embedding for the current page.
      cur_page_emb = keras.layers.Embedding(
          _TOP_K + 1, _EMBEDDING_DIM, input_length=1
      )(cur_page_input)
      x = keras.layers.Concatenate()(
          [cur_page_emb, session_index_input]
      )
      x = keras.layers.Dense(_UNITS, activation="relu")(x)
      outputs = keras.layers.Dense(_TOP_K + 1)(x)
      model = keras.Model(inputs=inputs, outputs=outputs)
      model.compile(
          loss=keras.losses.SparseCategoricalCrossentropy(
              from_logits=True
          ),
          optimizer=keras.optimizers.Adam(0.0001),
          metrics=[
              "sparse_categorical_accuracy",
              "sparse_top_k_categorical_accuracy",
          ],
      )
  
      model.summary(print_fn=absl.logging.info)
      return model
  
file_path: tfx/tfx/examples/tfjs_next_page_prediction/tfjs_next_page_prediction_util.py
imports: import os
  from typing import List
  import absl
  import tensorflow
  from tensorflow import keras
  import tensorflow_transform
  from tfx.components.trainer.rewriting import converters
  from tfx.components.trainer.rewriting import rewriter
  from tfx.components.trainer.rewriting import rewriter_factory
  from tfx.dsl.io import fileio
  from tfx import v1
  from tfx_bsl.public import tfxio
label_desc: Use image node_id 3 for calling a global function with example usage: _build_keras_model() and returns: model