code: def test_multistreams(format, stream_params):
      """
      Testing Support for additional Secondary Streams of variable bitrates or spatial resolutions.
      """
      assets_file_path = os.path.join(
          return_assets_path(False if format == "dash" else True),
          "asset_test.{}".format("mpd" if format == "dash" else "m3u8"),
      )
      results = extract_resolutions(
          stream_params["-video_source"], stream_params["-streams"]
      )
      try:
          streamer = StreamGear(
              output=assets_file_path,
              format=format,
              logging=True,
              **stream_params,
          )
          streamer.transcode_source()
          streamer.terminate()
          if format == "dash":
              metadata = extract_meta_mpd(assets_file_path)
              meta_videos = [
                  x
                  for x in metadata
                  if x["mime_type"].startswith("video")
              ]
              assert meta_videos and (
                  len(meta_videos) <= len(results)
              ), "Test Failed!"
              if len(meta_videos) == len(results):
                  for m_v, s_v in zip(
                      meta_videos, list(results.values())
                  ):
                      assert int(m_v["width"]) == int(
                          s_v["resolution"][0]
                      ), "Width check failed!"
                      assert int(m_v["height"]) == int(
                          s_v["resolution"][1]
                      ), "Height check failed!"
              else:
                  valid_widths = [
                      int(x["resolution"][0])
                      for x in list(results.values())
                  ]
                  valid_heights = [
                      int(x["resolution"][1])
                      for x in list(results.values())
                  ]
                  for m_v in meta_videos:
                      assert (
                          int(m_v["width"]) in valid_widths
                      ), "Width check failed!"
                      assert (
                          int(m_v["height"]) in valid_heights
                      ), "Height check failed!"
          else:
              meta_videos = check_valid_m3u8(assets_file_path)
              assert meta_videos and (
                  len(meta_videos) <= len(results)
              ), "Test Failed!"
              if len(meta_videos) == len(results):
                  for m_v, s_v in zip(
                      meta_videos, list(results.values())
                  ):
                      assert int(m_v["resolution"][0]) == int(
                          s_v["resolution"][0]
                      ), "Width check failed!"
                      assert int(m_v["resolution"][1]) == int(
                          s_v["resolution"][1]
                      ), "Height check failed!"
              else:
                  valid_widths = [
                      int(x["resolution"][0])
                      for x in list(results.values())
                  ]
                  valid_heights = [
                      int(x["resolution"][1])
                      for x in list(results.values())
                  ]
                  for m_v in meta_videos:
                      assert (
                          int(m_v["resolution"][0]) in valid_widths
                      ), "Width check failed!"
                      assert (
                          int(m_v["resolution"][1]) in valid_heights
                      ), "Height check failed!"
      except Exception as e:
          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 17 for calling a global function with example usage: test_multistreams(format, stream_params) without return types