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.985769, 1.985269], [2.986119, 3.986068]],
          optimizer=RectifiedAdam(lr=1e-3, amsgrad=True),
      )
  
imports: import numpy
  import pytest
  from packaging.version import Version
  import tensorflow
  from tensorflow_addons.optimizers import RectifiedAdam, Lookahead
label_desc: Use image node_id 5 for calling a global function with example usage: test_dense_sample_with_amsgrad() without return types