code: def test_impulse_noise():
      a = torch.rand(4, 3, 100, 100) / 2 + 0.25
      a1 = torchdrift.data.functional.impulse_noise(a, severity=4)
      assert a1.min().abs() + (1 - a1.max()).abs() < 1e-6
  
file_path: TorchDrift/test/test_corruption_functions.py
imports: import pytest
  import torchdrift
  import torch
  import scipy.ndimage
label_desc: Use image node_id 3 for calling a global function with example usage: test_impulse_noise() without return types