def test_hilbert_freq_constant_signal():
    """
    Test hilbert_freq with a constant signal.
    The imaginary part of the Hilbert transform should be zero.
    """
    batch, channels, seq_len = 1, 2, 100
    input_tensor = torch.ones(batch, channels, seq_len)
    output = hilbert_freq(input_tensor, forward_fourier=True)
    # Imaginary parts should be close to zero
    assert torch.allclose(output[..., 1], torch.zeros_like(output[..., 1]), atol=1e-5), \
        "Imaginary part should be zero for constant input"

    Test hilbert_freq with a constant signal.
    The imaginary part of the Hilbert transform should be zero.
    
test/unit_tests/models/test_functional.py