code: def test_sparse_sample_with_lookahead():
      # Expected values are obtained from the previous implementation
      # of Ranger.
      run_sparse_sample(
          iterations=150,
          expected=[[0.988156, 2.0], [3.0, 3.988291]],
          optimizer=Lookahead(
              RectifiedAdam(lr=1e-3, beta_1=0.95),
              sync_period=6,
              slow_step_size=0.45,
          ),
      )
  
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 12 for calling a global function with example usage: test_sparse_sample_with_lookahead() without return types