code: def test_model_dynamic_lr():
      grad = tf.Variable([[0.1]])
      model = tf.keras.Sequential(
          [
              tf.keras.layers.Dense(
                  1,
                  kernel_initializer=tf.keras.initializers.Constant(
                      [[1.0]]
                  ),
                  use_bias=False,
              )
          ]
      )
      model.build(input_shape=[1, 1])
  
      opt = Lookahead("adam", sync_period=10, slow_step_size=0.4)
      _ = opt.apply_gradients(list(zip([grad], model.variables)))
  
      np.testing.assert_allclose(opt.lr.read_value(), 1e-3)
  
      opt.lr = 1e-4
      np.testing.assert_allclose(opt.lr.read_value(), 1e-4)
  
file_path: addons/tensorflow_addons/optimizers/tests/lookahead_test.py
imports: import numpy
  import pytest
  import tensorflow
  from tensorflow_addons.optimizers import Lookahead
label_desc: Use image node_id 7 for calling a global function with example usage: test_model_dynamic_lr() without return types