code: def test_functional(self):
      inputs = layers.Input(shape=(3,))
      x = layers.Dense(1, name="first_dense")(inputs)
      outputs = layers.Dense(1, name="second_dense")(x)
      model = models.Model(inputs, outputs)
      model.compile(
          optimizer="adam",
          loss="mse",
      )
      X_train = np.random.rand(100, 3)
      y_train = np.random.rand(100, 1)
      model.fit(X_train, y_train)
      path = os.path.join(self.get_temp_dir(), "my_keras_model")
      tf.saved_model.save(model, path)
      restored_model = tf.saved_model.load(path)
      self.assertAllClose(
          model(X_train),
          restored_model.signatures["serving_default"](
              tf.convert_to_tensor(X_train, dtype=tf.float32)
          )["output_0"],
          rtol=1e-4,
          atol=1e-4,
      )
  
imports: import os
  import numpy
  import pytest
  import tensorflow
  from keras import backend
  from keras import layers
  from keras import metrics
  from keras import models
  from keras import optimizers
  from keras import testing
  from keras.saving import object_registration
label_desc: Use image node_id 2 for calling the SavedModelTest obj's underlying member method code with example usage: obj.test_functional() without return types