def METHOD_NAME(serialize):
    initial_learning_rate = 0.1
    max_learning_rate = 1
    step_size = 40
    triangular_cyclical_lr = cyclical_learning_rate.TriangularCyclicalLearningRate(
        initial_learning_rate=initial_learning_rate,
        maximal_learning_rate=max_learning_rate,
        step_size=step_size,
    )
    triangular_cyclical_lr = _maybe_serialized(triangular_cyclical_lr, serialize)
    expected = np.concatenate(
        [
            np.linspace(initial_learning_rate, max_learning_rate, num=step_size + 1),
            np.linspace(max_learning_rate, initial_learning_rate, num=step_size + 1)[
                1:
            ],
        ]
    )
    for step, expected_value in enumerate(expected):
        np.testing.assert_allclose(triangular_cyclical_lr(step), expected_value, 1e-6)