code: def run_dense_sample(iterations, expected, optimizer):
      var_0 = tf.Variable([1.0, 2.0], dtype=tf.dtypes.float32)
      var_1 = tf.Variable([3.0, 4.0], dtype=tf.dtypes.float32)
  
      grad_0 = tf.constant([0.1, 0.2], dtype=tf.dtypes.float32)
      grad_1 = tf.constant([0.03, 0.04], 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)
  
      np.testing.assert_allclose(
          var_0.read_value(), expected[0], atol=2e-4
      )
      np.testing.assert_allclose(
          var_1.read_value(), expected[1], atol=2e-4
      )
  
imports: import numpy
  import tensorflow
  from tensorflow_addons.optimizers import COCOB
label_desc: Use image node_id 1 for calling a global function with example usage: run_dense_sample(iterations, expected, optimizer) without return types