code: def _cvt_color(tens, cspace):
      if cspace == "rgb":
          return to_rgb(tens)
      if cspace == "bgr":
          return to_bgr(tens)
      if cspace == "gray":
          return to_gray(tens)
      if cspace == "hsv":
          return to_hsv(tens)
      if cspace == "hls":
          return to_hls(tens)
      if cspace == "lab":
          return to_lab(tens)
  
imports: import cv2
  import random
  import math
  import numpy
  from ..coreten import Tensor, to_tensor
  from ..annotations import Tuple, Union
  from ..color import to_hls, to_rgb, to_bgr, to_hsv, to_gray, to_lab
label_desc: Use image node_id 24 for calling a global function with example usage: _cvt_color(tens, cspace) and returns: to_rgb, to_bgr, to_gray, to_hsv, to_hls, to_lab