code: def test_to_gray():
      caer_gray_gray = caer.to_gray(cv_gray)
      caer_bgr_gray = caer.to_gray(cv_bgr)
      caer_rgb_gray = caer.to_gray(cv_rgb)
      caer_hsv_gray = caer.to_gray(cv_hsv)
      caer_hls_gray = caer.to_gray(cv_hls)
      caer_lab_gray = caer.to_gray(cv_lab)
      caer_yuv_gray = caer.to_gray(cv_yuv)
      caer_luv_gray = caer.to_gray(cv_luv)
  
      assert isinstance(caer_gray_gray, caer.Tensor)
      assert isinstance(caer_bgr_gray, caer.Tensor)
      assert isinstance(caer_rgb_gray, caer.Tensor)
      assert isinstance(caer_hsv_gray, caer.Tensor)
      assert isinstance(caer_hls_gray, caer.Tensor)
      assert isinstance(caer_lab_gray, caer.Tensor)
      assert isinstance(caer_yuv_gray, caer.Tensor)
      assert isinstance(caer_luv_gray, caer.Tensor)
  
      assert caer_gray_gray.shape == cv_gray.shape
      assert caer_bgr_gray.shape == cv_gray.shape
      assert caer_rgb_gray.shape == cv_gray.shape
      assert caer_hsv_gray.shape == cv_gray.shape
      assert caer_hls_gray.shape == cv_gray.shape
      assert caer_lab_gray.shape == cv_gray.shape
      assert caer_yuv_gray.shape == cv_gray.shape
      assert caer_luv_gray.shape == cv_gray.shape
  
      assert caer_gray_gray.cspace == "gray"
      assert caer_bgr_gray.cspace == "gray"
      assert caer_rgb_gray.cspace == "gray"
      assert caer_hsv_gray.cspace == "gray"
      assert caer_hls_gray.cspace == "gray"
      assert caer_lab_gray.cspace == "gray"
      assert caer_yuv_gray.cspace == "gray"
      assert caer_luv_gray.cspace == "gray"
  
      assert len(caer_gray_gray.shape) == 2
      assert len(caer_bgr_gray.shape) == 2
      assert len(caer_rgb_gray.shape) == 2
      assert len(caer_hsv_gray.shape) == 2
      assert len(caer_hls_gray.shape) == 2
      assert len(caer_lab_gray.shape) == 2
      assert len(caer_yuv_gray.shape) == 2
      assert len(caer_luv_gray.shape) == 2
  
file_path: caer/tests/color/test_core.py
imports: import caer
  import cv2
  import os
label_desc: Use image node_id 3 for calling a global function with example usage: test_to_gray() without return types