code: def test_dense_sample_with_amsgrad():
      # Expected values are obtained from the official implementation
      # `amsgrad` has no effect because the gradient is fixed
      run_dense_sample(
          iterations=100,
          expected=[[0.67249274, 1.6724932], [2.6724923, 3.6724923]],
          optimizer=AdaBelief(lr=1e-3, amsgrad=True, rectify=False),
      )
  
imports: import numpy
  import pytest
  from packaging.version import Version
  import tensorflow.compat.v2
  from tensorflow_addons.optimizers import AdaBelief, Lookahead
label_desc: Use image node_id 5 for calling a global function with example usage: test_dense_sample_with_amsgrad() without return types