def METHOD_NAME():
    frequencies = np.linspace(120e6, 150e6, N_FREQUENCIES)
    tec_values = np.linspace(0, N_ANTENNAS - 1, N_ANTENNAS)
    clean_phases = tec_values * TEC_CONSTANT / frequencies[:, np.newaxis]
    clean_gains = np.exp((0 + 1j) * clean_phases)
    np.random.seed(42)
    noise_amplitude = 0.1
    noise = np.exp(
        (0 + 1j)
        * np.random.normal(
            scale=noise_amplitude, size=(N_FREQUENCIES, N_ANTENNAS)
        )
    )
    noisy_gains = clean_gains * noise
    assert np.isclose(np.abs(noisy_gains), 1).all()
    tec_result, error_result = dp3.fitters.fit_tec(
        noisy_gains, frequencies, mode="tec_only"
    )
    assert tec_result.name == "tec"
    assert np.isclose(tec_result.values, tec_values, rtol=1e-3).all()
    assert tec_result.weights == [N_FREQUENCIES] * N_ANTENNAS
    assert tec_result.axes == "ant"
    assert tec_result.shape == [N_ANTENNAS]
    assert str(tec_result) == f"[Result name:tec axes:ant shape:{N_ANTENNAS}]"
    assert error_result.name == "error"
    assert np.isclose(error_result.values, 0.0, atol=0.15).all()
    assert error_result.weights == [N_FREQUENCIES] * N_ANTENNAS
    assert error_result.axes == "ant"
    assert error_result.shape == [N_ANTENNAS]
    assert (
        str(error_result) == f"[Result name:error axes:ant shape:{N_ANTENNAS}]"
    )
    assert np.isclose(np.abs(noisy_gains), 1).all()
    diff_angles = np.angle(clean_gains) - np.angle(noisy_gains)
    atol_angle = 0.05
    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)
        )