code: def test_optimizer_failure():
      with pytest.raises(TypeError):
          _ = SWA(None, average_period=10)
  
file_path: addons/tensorflow_addons/optimizers/tests/stochastic_weight_averaging_test.py
imports: import numpy
  import pytest
  import tensorflow
  from tensorflow_addons.optimizers import stochastic_weight_averaging
  from tensorflow_addons.optimizers.utils import fit_bn
label_desc: Use image node_id 2 for calling a global function with example usage: test_optimizer_failure() without return types