code: def run_dense_sample(iterations, optimizer, seed=0x2019):
      np.random.seed(seed)
      tf.random.set_seed(seed)
  
      val_0 = np.random.random((2,))
      val_1 = np.random.random((2,))
  
      var_0 = tf.Variable(val_0, dtype=tf.dtypes.float32)
      var_1 = tf.Variable(val_1, dtype=tf.dtypes.float32)
  
      grad_0 = tf.constant(
          np.random.standard_normal((2,)), dtype=tf.dtypes.float32
      )
      grad_1 = tf.constant(
          np.random.standard_normal((2,)), dtype=tf.dtypes.float32
      )
  
      grads_and_vars = list(zip([grad_0, grad_1], [var_0, var_1]))
  
      for _ in range(iterations):
          optimizer.apply_gradients(grads_and_vars)
  
      return [val_0, val_1], [var_0, var_1]
  
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 1 for calling a global function with example usage: run_dense_sample(iterations, optimizer, seed) and returns: list,  list