code: def test_color(data, func, check, request):
      """test_io_color"""
  
      np.random.seed(1000)
  
      input_3d = data()
      expected_3d = check(input_3d)
  
      output_3d = func(input_3d)
      if (
          input_3d.dtype == np.float32
          or request.node.callspec.id == "rgb_to_ycbcr"
      ):
          assert np.allclose(output_3d, expected_3d, rtol=0.03)
      else:
          assert np.array_equal(output_3d, expected_3d)
  
      input_4d = tf.expand_dims(input_3d, axis=0)
      expected_4d = tf.expand_dims(expected_3d, axis=0)
  
      output_4d = func(input_4d)
      if (
          input_4d.dtype == np.float32
          or request.node.callspec.id == "rgb_to_ycbcr"
      ):
          assert np.allclose(output_4d, expected_4d, rtol=0.03)
      else:
          assert np.array_equal(output_4d, expected_4d)
  
file_path: io/tests/test_color.py
imports: import os
  import shutil
  import tempfile
  import numpy
  import pytest
  import skimage.color
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 1 for calling a global function with example usage: test_color(data, func, check, request) without return types