code: def test_decode_nv12():
      """Test case for decode_nv12"""
      filename = os.path.join(
          os.path.dirname(os.path.abspath(__file__)),
          "test_image",
          "Jelly-Beans.nv12",
      )
      png_filename = os.path.join(
          os.path.dirname(os.path.abspath(__file__)),
          "test_image",
          "Jelly-Beans.nv12.png",
      )
      png = tf.image.decode_png(tf.io.read_file(png_filename))
  
      contents = tf.io.read_file(filename)
      rgb = tfio.experimental.image.decode_nv12(
          contents, size=[256, 256]
      )
      assert rgb.dtype == tf.uint8
      assert rgb.shape == [256, 256, 3]
      assert np.all(rgb == png)
  
imports: import os
  import numpy
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 11 for calling a global function with example usage: test_decode_nv12() without return types