code: def test_drop_freq(device):
      from speechbrain.augment.time_domain import DropFreq
  
      test_waveform = torch.sin(
          torch.arange(16000.0, device=device)
      ).unsqueeze(0)
  
      # Edge cases
      no_drop = DropFreq(drop_freq_count_low=0, drop_freq_count_high=0)
      assert no_drop(test_waveform).allclose(test_waveform)
  
      # Check case where frequency range *does not* include signal frequency
      drop_diff_freq = DropFreq(drop_freq_low=0.5, drop_freq_high=0.9)
      assert drop_diff_freq(test_waveform).allclose(
          test_waveform, atol=5e-1
      )
  
      # Check case where frequency range *does* include signal frequency
      drop_same_freq = DropFreq(drop_freq_low=0.28, drop_freq_high=0.28)
      assert drop_same_freq(test_waveform).allclose(
          torch.zeros(1, 16000, device=device), atol=4e-1
      )
  
file_path: speechbrain/tests/unittests/test_augment.py
imports: import os
  import torch
  import torchaudio
  from speechbrain.dataio.dataio import write_audio
label_desc: Use image node_id 4 for calling a global function with example usage: test_drop_freq(device) without return types