code: def test_custom_cyclical_learning_rate(serialize):
      initial_learning_rate = 0.1
      maximal_learning_rate = 1
      step_size = 4000
  
      def scale_fn(x):
          return 1 / (5 ** (x * 0.0001))
  
      custom_cyclical_lr = cyclical_learning_rate.CyclicalLearningRate(
          initial_learning_rate=initial_learning_rate,
          maximal_learning_rate=maximal_learning_rate,
          step_size=step_size,
          scale_fn=scale_fn,
      )
      custom_cyclical_lr = _maybe_serialized(
          custom_cyclical_lr, serialize
      )
  
      for step in range(1, 8001):
          cycle = np.floor(1 + step / (2 * step_size))
          non_bounded_value = np.abs(step / step_size - 2 * cycle + 1)
          expected = initial_learning_rate + (
              maximal_learning_rate - initial_learning_rate
          ) * np.maximum(0, 1 - non_bounded_value) * scale_fn(cycle)
          np.testing.assert_allclose(
              custom_cyclical_lr(step).numpy(), expected, 1e-6, 1e-6
          )
  
file_path: addons/tensorflow_addons/optimizers/tests/cyclical_learning_rate_test.py
imports: import pytest
  import numpy
  from tensorflow_addons.optimizers import cyclical_learning_rate
label_desc: Use image node_id 5 for calling a global function with example usage: test_custom_cyclical_learning_rate(serialize) and returns: unknown