def test_plv_time_perfect_synchronization():
    """
    Test plv_time with perfectly synchronized signals.
    The PLV matrix should be all ones.
    """
    batch, channels, time = 1, 3, 1000
    t = torch.linspace(0, 2 * np.pi, steps=time)
    signal = torch.sin(t)
    # Create identical signals across all channels
    input_tensor = signal.unsqueeze(0).repeat(batch, channels, 1)
    plv_matrix = plv_time(input_tensor, forward_fourier=True)
    expected = torch.ones(batch, channels, channels)
    assert torch.allclose(plv_matrix, expected, atol=1e-5), \
        "PLV should be 1 for perfectly synchronized signals"

    Test plv_time with perfectly synchronized signals.
    The PLV matrix should be all ones.
    
test/unit_tests/models/test_functional.py