code: def extract_resolutions(source, streams):
      """
      Extracts resolution value from dictionaries
      """
      if not (source) or not (streams):
          return {}
      results = {}
      assert os.path.isfile(source), "Not a valid source"
      results["source"] = extract_meta_video(source)
      num = 0
      for stream in streams:
          if "-resolution" in stream:
              try:
                  res = stream["-resolution"].split("x")
                  assert len(res) == 2
                  width, height = (res[0].strip(), res[1].strip())
                  assert width.isnumeric() and height.isnumeric()
                  results["streams{}".format(num)] = {
                      "resolution": (width, height)
                  }
                  num += 1
              except Exception as e:
                  logger.error(str(e))
                  continue
          else:
              continue
      return results
  
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 9 for calling a global function with example usage: extract_resolutions(source, streams) and returns: results, dict