def METHOD_NAME(device):
    paddle.device.set_device(device)
    from paddlespeech.vector.io.augment import SpeedPerturb
    test_waveform = paddle.sin(
        paddle.arange(16000.0, dtype="float32")).unsqueeze(0)
    # Edge cases
    no_perturb = SpeedPerturb(16000, perturb_prob=0.0)
    assert no_perturb(test_waveform).allclose(test_waveform)
    no_perturb = SpeedPerturb(16000, speeds=[100])
    assert no_perturb(test_waveform).allclose(test_waveform)
    # # Half speed
    half_speed = SpeedPerturb(16000, speeds=[50])
    assert half_speed(test_waveform).allclose(test_waveform[:, ::2], atol=3e-1)