code: def make_mlp_functional_model(hparams):
      """Creates a functional API-based multi-layer perceptron model."""
      inputs = tf.keras.Input(
          shape=(hparams.max_seq_length,), dtype="int64", name="words"
      )
  
      # Input is already one-hot encoded in the integer format. We cast it to
      # floating point format here.
      cur_layer = tf.keras.layers.Lambda(
          lambda x: tf.keras.backend.cast(x, tf.float32)
      )(inputs)
  
      for num_units in hparams.num_fc_units:
          cur_layer = tf.keras.layers.Dense(
              num_units, activation="relu"
          )(cur_layer)
          # For functional models, by default, Keras ensures that the 'dropout' layer
          # is invoked only during training.
          cur_layer = tf.keras.layers.Dropout(hparams.dropout_rate)(
              cur_layer
          )
  
      outputs = tf.keras.layers.Dense(
          hparams.num_classes, activation="softmax"
      )(cur_layer)
  
      model = tf.keras.Model(inputs, outputs=outputs)
      return model
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import threading
  from absl import app
  from absl import flags
  from absl import logging
  import attr
  import neural_structured_learning
  from research.carls import dynamic_embedding_config_pb2
  from research.carls import dynamic_embedding_neighbor_cache
  from research.carls import graph_regularization
  from research.carls import kbs_server_helper_pybind
  import tensorflow
  from google.protobuf import text_format
label_desc: Use image node_id 5 for calling a global function with example usage: make_mlp_functional_model(hparams) and returns: model