code: def test_serialization(self):
      # Test basic model
      inputs = Input(shape=(3,), batch_size=2)
      outputs = layers.Dense(3)(inputs)
      model = Functional(inputs, outputs, trainable=False)
      self.run_class_serialization_test(model)
  
      # Test multi-io model
      input_a = Input(shape=(3,), batch_size=2, name="input_a")
      input_b = Input(shape=(3,), batch_size=2, name="input_b")
      xa = layers.Dense(5, name="middle_a")(input_a)
      xb = layers.Dense(5, name="middle_b")(input_b)
      output_a = layers.Dense(4, name="output_a")(xa)
      output_b = layers.Dense(4, name="output_b")(xb)
      model = Functional(
          [input_a, input_b], [output_a, output_b], name="func"
      )
      self.run_class_serialization_test(model)
  
      # Test model that includes floating ops
      input_a = Input(shape=(3,), batch_size=2, name="input_a")
      input_b = Input(shape=(3,), batch_size=2, name="input_b")
      x = input_a + input_b
      x = layers.Dense(5, name="middle")(x)
      output_a = layers.Dense(4, name="output_a")(x)
      output_b = layers.Dense(4, name="output_b")(x)
      model = Functional(
          [input_a, input_b], [output_a, output_b], name="func"
      )
      self.run_class_serialization_test(model)
  
      # Test model with dict i/o
      input_a = Input(shape=(3,), batch_size=2, name="a")
      input_b = Input(shape=(3,), batch_size=2, name="b")
      x = input_a + input_b
      x = layers.Dense(5)(x)
      outputs = layers.Dense(4)(x)
      model = Functional({"a": input_a, "b": input_b}, outputs)
      self.run_class_serialization_test(model)
  
imports: import warnings
  import numpy
  import pytest
  from keras import backend
  from keras import layers
  from keras import testing
  from keras.layers.core.input_layer import Input
  from keras.layers.input_spec import InputSpec
  from keras.models import Functional
  from keras.models import Model
label_desc: Use image node_id 14 for calling the FunctionalTest obj's underlying member method code with example usage: obj.test_serialization() without return types