def METHOD_NAME():
    frequencies = np.linspace(100e6, 110e6, N_FREQUENCIES)
    tec_value = 0.42
    clean_gains = np.exp((0 + 1j) * tec_value * TEC_CONSTANT / frequencies)
    np.random.seed(42)
    noise_amplitude = 0.1
    noise = np.exp(
        (0 + 1j)
        * np.random.normal(scale=noise_amplitude, size=(N_FREQUENCIES))
    )
    noisy_gains = clean_gains * noise
    assert np.isclose(np.abs(noisy_gains), 1).all()
    tec_result, phase_result, error_result = dp3.fitters.fit_tec(
        noisy_gains, frequencies
    )
    assert tec_result.name == "tec"
    assert phase_result.name == "phase"
    assert error_result.name == "error"
    assert tec_result.axes == "ant"
    assert phase_result.axes == "ant"
    assert error_result.axes == "ant"
    assert tec_result.shape == [1]
    assert phase_result.shape == [1]
    assert error_result.shape == [1]
    assert str(tec_result) == "[Result name:tec axes:ant shape:1]"
    assert str(phase_result) == "[Result name:phase axes:ant shape:1]"
    assert str(error_result) == "[Result name:error axes:ant shape:1]"
    assert (
        repr(tec_result)
        == "<dp3.fitters.Result name=tec axes=ant values=[0.41872,] weights=[42,]>"
    )
    assert (
        repr(phase_result)
        == "<dp3.fitters.Result name=phase axes=ant values=[-0.121689,] weights=[42,]>"
    )
    assert (
        repr(error_result)
        == "<dp3.fitters.Result name=error axes=ant values=[0.074679,] weights=[42,]>"
    )
    assert np.isclose(tec_result.values[0], tec_value, rtol=1e-2)
    assert np.isclose(phase_result.values[0], 0.0, atol=1.0)  # Tolerance: 1 Hz
    assert np.isclose(error_result.values[0], 0.0, atol=0.1)
    assert tec_result.weights == [N_FREQUENCIES]
    assert phase_result.weights == [N_FREQUENCIES]
    assert error_result.weights == [N_FREQUENCIES]
    assert np.isclose(np.abs(noisy_gains), 1).all()
    diff_angles = np.angle(clean_gains) - np.angle(noisy_gains)
    atol_angle = 0.03
    for diff_angle in np.ndarray.flatten(diff_angles):
        # The phase difference should be close to 0, 2*PI or -2*PI.
        assert (
            np.isclose(diff_angle, 0, atol=atol_angle)
            or np.isclose(diff_angle, 2 * np.pi, atol=atol_angle)
            or np.isclose(diff_angle, -2 * np.pi, atol=atol_angle)
        )