code: def test_apply_layer(self):
      if backend.config.image_data_format() == "channels_last":
          images = np.ones((1, 2, 2, 1))
      else:
          images = np.ones((1, 1, 2, 2))
      sn_wrapper = layers.SpectralNormalization(
          layers.Conv2D(
              1,
              (2, 2),
              kernel_initializer=initializers.Constant(value=1),
          ),
          power_iterations=8,
      )
  
      result = sn_wrapper(images, training=False)
      result_train = sn_wrapper(images, training=True)
      expected_output = np.array([[[[4.0]]]], dtype=np.float32)
      self.assertAllClose(result, expected_output)
      # max eigen value of 2x2 matrix of ones is 2
      self.assertAllClose(result_train, expected_output / 2)
  
file_path: keras/keras/layers/normalization/spectral_normalization_test.py
imports: import numpy
  import pytest
  from keras import backend
  from keras import initializers
  from keras import layers
  from keras import testing
label_desc: Use image node_id 4 for calling the SpectralNormalizationTest obj's underlying member method code with example usage: obj.test_apply_layer() without return types