code: def test_colorspaces(conversion):
      """
      Testing different colorspace with CamGear API.
      """
      try:
          # Open stream
          options = {"THREAD_TIMEOUT": 300}
          stream = CamGear(
              source=return_testvideo_path(),
              colorspace=conversion,
              logging=True,
              **options,
          ).start()
          while True:
              frame = stream.read()
              # check if frame is None
              if frame is None:
                  # if True break the infinite loop
                  break
              if conversion == "COLOR_BGR2INVALID":
                  # test invalid color_space value
                  stream.color_space = conversion
                  conversion = "COLOR_BGR2INVALID2"
              if conversion == "COLOR_BGR2INVALID2":
                  # test wrong color_space value
                  stream.color_space = 1546755546
                  conversion = ""
          stream.stop()
      except Exception as e:
          if not isinstance(e, (AssertionError, queue.Empty)):
              pytest.fail(str(e))
          else:
              logger.exception(str(e))
  
file_path: vidgear/vidgear/tests/videocapture_tests/test_camgear.py
imports: import os
  import cv2
  import time
  import queue
  import numpy
  import pytest
  import logging
  import platform
  import tempfile
  from vidgear.gears import CamGear
  from vidgear.gears.helper import logger_handler
label_desc: Use image node_id 7 for calling a global function with example usage: test_colorspaces(conversion) without return types