code: def test_model():
      inputs = tf.keras.Input(shape=(4,))
      output = tf.keras.layers.Dense(16)(inputs)
      output = tf.keras.layers.Dense(16)(output)
      output = tf.keras.layers.Dense(32)(output)
      output = tf.keras.layers.Dense(32)(output)
      model = tf.keras.Model(inputs, output)
  
      # Adam optimizer on the whole model and an additional SGD on the last layer.
      optimizers_and_layers = [
          (tf.keras.optimizers.Adam(), model),
          (tf.keras.optimizers.SGD(), model.layers[-1]),
      ]
  
      multi_optimizer = MultiOptimizer(optimizers_and_layers)
      model.compile(multi_optimizer, loss="mse")
  
      x = np.ones((128, 4)).astype(np.float32)
      y = np.ones((128, 32)).astype(np.float32)
      model.fit(x, y, batch_size=32, epochs=10)
  
      assert_sync_iterations(
          model.optimizer, desired=ceil(128 / 32) * 10
      )
  
file_path: addons/tensorflow_addons/optimizers/tests/discriminative_layer_training_test.py
imports: from math import ceil
  from packaging.version import Version
  import pytest
  import numpy
  import tensorflow
  from tensorflow_addons.optimizers.discriminative_layer_training import MultiOptimizer
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 6 for calling a global function with example usage: test_model() without return types