code: def convert_color_factory(src, dst):
      code = getattr(cv2, f"COLOR_{src.upper()}2{dst.upper()}")
  
      def convert_color(img):
          out_img = cv2.cvtColor(img, code)
          return out_img
  
      convert_color.__doc__ = f"""Convert a {src.upper()} image to {dst.upper()}
          image.
  
      Args:
          img (ndarray or str): The input image.
  
      Returns:
          ndarray: The converted {dst.upper()} image.
      """
  
      return convert_color
  
file_path: lavis/lavis/common/annotator/uniformer/mmcv/image/colorspace.py
imports: import cv2
  import numpy
label_desc: Use image node_id 12 for calling a global function with example usage: convert_color_factory(src, dst) and returns: convert_color, out_img