code: def impulse_noise(x, severity=1):
      """Impulse noise corruption to images.
  
      Args:
        x: numpy array, uncorrupted image, assumed to have uint8 pixel in [0,255].
        severity: integer, severity of corruption.
  
      Returns:
        numpy array, image with uint8 pixels in [0,255]. Added impulse noise.
      """
      c = [0.03, 0.06, 0.09, 0.17, 0.27][severity - 1]
      x = tfds.core.lazy_imports.skimage.util.random_noise(
          np.array(x) / 255.0, mode="s&p", amount=c
      )
      x_clip = np.clip(x, 0, 1) * 255
      return around_and_astype(x_clip)
  
imports: import io
  import subprocess
  import tempfile
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 8 for calling a global function with example usage: impulse_noise(x, severity) and returns: around_and_astype