code: def jpeg_compression(x, severity=1):
      """Conduct jpeg compression 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 jpeg compression.
      """
      c = [25, 18, 15, 10, 7][severity - 1]
      x = tfds.core.lazy_imports.PIL_Image.fromarray(x.astype(np.uint8))
      output = io.BytesIO()
      x.save(output, "JPEG", quality=c)
      output.seek(0)
      x = tfds.core.lazy_imports.PIL_Image.open(output)
      return np.asarray(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 17 for calling a global function with example usage: jpeg_compression(x, severity) and returns: np