code: def test_save_load_model(tmpdir):
      base_layer = tf.keras.layers.Dense(1)
      input_shape = [1]
  
      inputs = tf.keras.layers.Input(shape=input_shape)
      sn_layer = spectral_normalization.SpectralNormalization(
          base_layer
      )
      model = tf.keras.models.Sequential(layers=[inputs, sn_layer])
  
      # initialize model
      model.predict(np.random.uniform(size=(2, 1)))
  
      model_path = str(tmpdir / "test.h5")
      model.save(model_path)
      new_model = tf.keras.models.load_model(model_path)
  
      assert (
          model.layers[0].get_config()
          == new_model.layers[0].get_config()
      )
  
file_path: addons/tensorflow_addons/layers/tests/spectral_normalization_test.py
imports: import numpy
  import pytest
  import tensorflow
  from tensorflow_addons.layers import spectral_normalization
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_save_load_model(tmpdir) without return types