code: def test_rtf_stream(conversion, format):
      """
      Testing Real-Time Frames Mode
      """
      assets_file_path = return_assets_path(
          False if format == "dash" else True
      )
  
      try:
          # Open stream
          options = {"THREAD_TIMEOUT": 300}
          stream = CamGear(
              source=return_testvideo_path(),
              colorspace=conversion,
              **options,
          ).start()
          stream_params = {
              "-clear_prev_assets": True,
              "-input_framerate": "invalid",
          }
          if format == "hls":
              stream_params.update(
                  {
                      "-hls_base_url": return_assets_path(
                          False if format == "dash" else True
                      )
                      + os.sep
                  }
              )
          streamer = StreamGear(
              output=assets_file_path, format=format, **stream_params
          )
          while True:
              frame = stream.read()
              # check if frame is None
              if frame is None:
                  break
              if conversion == "COLOR_BGR2RGBA":
                  streamer.stream(frame, rgb_mode=True)
              else:
                  streamer.stream(frame)
          stream.stop()
          streamer.terminate()
          asset_file = [
              os.path.join(assets_file_path, f)
              for f in os.listdir(assets_file_path)
              if f.endswith(".mpd" if format == "dash" else ".m3u8")
          ]
          assert len(asset_file) == 1, "Failed to create asset file!"
          if format == "dash":
              assert check_valid_mpd(asset_file[0]), "Test Failed!"
          else:
              assert extract_meta_video(asset_file[0]), "Test Failed!"
      except Exception as e:
          if not isinstance(e, queue.Empty):
              pytest.fail(str(e))
  
imports: import os
  import cv2
  import queue
  import pytest
  import m3u8
  import logging
  import platform
  import tempfile
  from mpegdash.parser import MPEGDASHParser
  from vidgear.gears import CamGear, StreamGear
  from vidgear.gears.helper import logger_handler, validate_video
label_desc: Use image node_id 12 for calling a global function with example usage: test_rtf_stream(conversion, format) without return types