code: def test_opt_failure():
      base_opt = None
      with pytest.raises(TypeError):
          MovingAverage(base_opt, 0.5)
  
imports: import numpy
  import pytest
  import tensorflow
  from packaging.version import Version
  from tensorflow_addons.optimizers import MovingAverage
label_desc: Use image node_id 2 for calling a global function with example usage: test_opt_failure() without return types