code: def _encode_jpeg(image, quality=None):
      cv2 = tfds.core.lazy_imports.cv2
      extra_args = (
          [[int(cv2.IMWRITE_JPEG_QUALITY), quality]] if quality else []
      )
      _, buff = cv2.imencode(".jpg", image, *extra_args)
      return io.BytesIO(buff.tobytes())
  
imports: import io
  import os
  from absl import logging
  import numpy
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling a global function with example usage: _encode_jpeg(image, quality) and returns: io