code: def snow(x, severity=1):
      """Apply snow 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]. Applied snow.
      """
      cv2 = tfds.core.lazy_imports.cv2
      PIL_Image = (
          tfds.core.lazy_imports.PIL_Image
      )  # pylint: disable=invalid-name
      c = [
          (0.1, 0.3, 3, 0.5, 10, 4, 0.8),
          (0.2, 0.3, 2, 0.5, 12, 4, 0.7),
          (0.55, 0.3, 4, 0.9, 12, 8, 0.7),
          (0.55, 0.3, 4.5, 0.85, 12, 8, 0.65),
          (0.55, 0.3, 2.5, 0.85, 12, 12, 0.55),
      ][severity - 1]
  
      x = np.array(x, dtype=np.float32) / 255.0
      snow_layer = np.random.normal(
          size=x.shape[:2], loc=c[0], scale=c[1]
      )  # [:2] for monochrome
  
      snow_layer = clipped_zoom(snow_layer[..., np.newaxis], c[2])
      snow_layer[snow_layer < c[3]] = 0
  
      snow_layer = PIL_Image.fromarray(
          (np.clip(snow_layer.squeeze(), 0, 1) * 255).astype(np.uint8),
          mode="L",
      )
  
      with tempfile.NamedTemporaryFile() as im_input:
          with tempfile.NamedTemporaryFile() as im_output:
              snow_layer.save(im_input.name, format="PNG")
  
              convert_bin = _imagemagick_bin()
              radius = c[4]
              sigma = c[5]
              angle = np.random.uniform(-135, -45)
  
              subprocess.check_output(
                  [
                      convert_bin,
                      "-motion-blur",
                      "{}x{}+{}".format(radius, sigma, angle),
                      im_input.name,
                      im_output.name,
                  ]
              )
  
              with open(im_output.name, "rb") as f:
                  output = f.read()
  
      snow_layer = (
          cv2.imdecode(
              np.frombuffer(output, np.uint8), cv2.IMREAD_UNCHANGED
          )
          / 255.0
      )
      snow_layer = snow_layer[..., np.newaxis]
  
      x = c[6] * x + (1 - c[6]) * np.maximum(
          x,
          cv2.cvtColor(x, cv2.COLOR_RGB2GRAY).reshape(224, 224, 1) * 1.5
          + 0.5,
      )
      x = (
          np.clip(x + snow_layer + np.rot90(snow_layer, k=2), 0, 1)
          * 255
      )
  
      return around_and_astype(x)
  
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 19 for calling a global function with example usage: snow(x, severity) and returns: around_and_astype