code: def test_video_detection_retinanet_analysis():
      delete_cache([video_file_output + ".mp4"])
  
      detector = VideoObjectDetection()
      detector.setModelTypeAsRetinaNet()
      detector.setModelPath(
          model_path=os.path.join(
              test_folder,
              "data-models",
              "retinanet_resnet50_fpn_coco-eeacb38b.pth",
          )
      )
      detector.loadModel()
  
      with patch.object(CallbackFunctions, "forFrame") as frameFunc:
          with patch.object(
              CallbackFunctions, "forSecond"
          ) as secondFunc:
              video_path = detector.detectObjectsFromVideo(
                  input_file_path=video_file,
                  output_file_path=video_file_output,
                  save_detected_video=True,
                  frames_per_second=30,
                  log_progress=True,
                  per_frame_function=frameFunc,
                  per_second_function=secondFunc,
                  return_detected_frame=True,
              )
  
              assert os.path.exists(video_file_output + ".mp4")
              assert isinstance(video_path, str)
  
              frameFunc.assert_called()
              secondFunc.assert_called()
  
      delete_cache([video_file_output + ".mp4"])
  
file_path: ImageAI/test/test_video_object_detection.py
imports: import os, sys
  from typing import List
  from numpy import ndarray
  from os.path import dirname
  from mock import patch
  from imageai.Detection import VideoObjectDetection
label_desc: Use image node_id 6 for calling a global function with example usage: test_video_detection_retinanet_analysis() without return types