code: def test_opencv_video_format(codec, file_ext):
      with tempfile.TemporaryDirectory(
          prefix="video_format_test"
      ) as dir:
          filename = os.path.join(dir, "test_file" + file_ext)
          writer = cv2.VideoWriter(
              filename=filename,
              fourcc=cv2.VideoWriter_fourcc(*codec),
              fps=float(30),
              frameSize=(10, 10),
              isColor=True,
          )
          [
              writer.write(np.zeros((10, 10, 3), np.uint8))
              for _ in range(30)
          ]
          writer.release()
          if os.path.isfile(filename):
              return True
          return False
  
file_path: detectron2/demo/demo.py
imports: import argparse
  import glob
  import multiprocessing
  import numpy
  import os
  import tempfile
  import time
  import warnings
  import cv2
  import tqdm
  from detectron2.config import get_cfg
  from detectron2.data.detection_utils import read_image
  from detectron2.utils.logger import setup_logger
  from predictor import VisualizationDemo
label_desc: Use image node_id 3 for calling a global function with example usage: test_opencv_video_format(codec, file_ext) and returns: False, True