code: def process_video(
      video,
      detector,
      tracker,
      preprocesser,
      postprocesser,
      frame_skip_period=1,
      create_video=False,
  ):
      tracker_time_mean = 0
      detector_time_mean = 0
  
      start_time = time.time()
  
      total_frames = 0
      for frame_number, frame in enumerate(video):
          total_frames += 1
  
          if frame_number % frame_skip_period == 0:
              start_frame_time = time.time()
              data = preprocesser(frame)
              cmap, paf = detector(data)
              detections = postprocesser(cmap, paf)
              detector_time = time.time()
  
              tracked_objects = tracker.update(
                  detections=detections, period=frame_skip_period
              )
              tracker_time = time.time()
  
              tracker_time_mean += tracker_time - detector_time
              detector_time_mean += detector_time - start_frame_time
          else:
              start_frame_time = time.time()
              tracked_objects = tracker.update()
              tracker_time = time.time()
              tracker_time_mean += tracker_time - start_frame_time
  
          if create_video:
              norfair.draw_tracked_objects(frame, tracked_objects)
              video.write(frame)
  
      total_time = time.time() - start_time
      fps = total_frames / total_time
      tracker_time_mean /= total_frames
      detector_time_mean /= total_frames
      return fps, tracker_time_mean, detector_time_mean
  
file_path: norfair/demos/profiling/src/demo.py
imports: import argparse
  import os
  import sys
  import time
  import norfair
  from norfair import Tracker, Video
  from utils import DETECTION_THRESHOLD, DISTANCE_THRESHOLD, HIT_COUNTER_MAX, INITIALIZATION_DELAY, POINTWISE_HIT_COUNTER_MAX, get_distance_function, get_filter_setup, get_model, get_postprocesser, get_preprocesser, model_path, model_resolution
label_desc: Use image node_id 1 for calling a global function with example usage: process_video(video, detector, tracker, preprocesser, postprocesser, frame_skip_period, create_video) and returns: fps,  tracker_time_mean,  detector_time_mean