code: def validate_video(path, video_path=None, logging=False):
      """
      ## validate_video
  
      Validates video by retrieving resolution/size and framerate from file.
  
      Parameters:
          path (string): absolute path of FFmpeg binaries
          video_path (string): absolute path to Video.
  
      **Returns:** A dictionary of retieved Video resolution _(as tuple(width, height))_ and framerate _(as float)_.
      """
      if video_path is None or not (video_path):
          logger.warning("Video path is empty!")
          return None
  
      # extract metadata
      metadata = check_output(
          [path, "-hide_banner", "-i", video_path],
          force_retrieve_stderr=True,
      )
      # clean and search
      stripped_data = [
          x.decode("utf-8").strip() for x in metadata.split(b"\n")
      ]
      logging and logger.debug(stripped_data)
      result = {}
      for data in stripped_data:
          output_a = re.findall(r"([1-9]\d+)x([1-9]\d+)", data)
          output_b = re.findall(r"\d+(?:\.\d+)?\sfps", data)
          if len(result) == 2:
              break
          if output_b and not "framerate" in result:
              result["framerate"] = re.findall(
                  r"[\d\.\d]+", output_b[0]
              )[0]
          if output_a and not "resolution" in result:
              result["resolution"] = output_a[-1]
  
      # return values
      return result if (len(result) == 2) else None
  
imports: import os
  import re
  import sys
  import cv2
  import types
  import errno
  import stat
  import shutil
  import importlib
  import requests
  import numpy
  import logging
  import platform
  import socket
  from tqdm import tqdm
  from contextlib import closing
  from pathlib import Path
  from colorlog import ColoredFormatter
  from pkg_resources import parse_version
  from requests.adapters import HTTPAdapter, Retry
  from ..version import __version__
label_desc: Use image node_id 15 for calling a global function with example usage: validate_video(path, video_path, logging) and returns: unknown, None