code: def test_stream_mode(url, quality, parameters):
      """
      Testing Stream Mode Playback capabilities of CamGear
      """
      try:
          height = 0
          width = 0
          fps = 0
          options = {
              "STREAM_RESOLUTION": quality,
              "STREAM_PARAMS": parameters,
          }
          # get params
          stream = CamGear(
              source=url, stream_mode=True, logging=True, **options
          ).start()  # YouTube Video URL as input
          while True:
              frame = stream.read()
              if frame is None:
                  break
              if height == 0 or width == 0:
                  fps = stream.framerate
                  height, width = frame.shape[:2]
                  break
          stream.stop()
          logger.debug(
              "WIDTH: {} HEIGHT: {} FPS: {}".format(width, height, fps)
          )
      except Exception as e:
          if isinstance(e, (RuntimeError, ValueError, cv2.error)):
              pytest.xfail(str(e))
          else:
              pytest.fail(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 5 for calling a global function with example usage: test_stream_mode(url, quality, parameters) without return types