code: def main(
      video_path: str,
      output_path: str,
      distance_threshold: float,
      skip_period: int,
      initialization_delay: int,
      hit_counter_max: int,
      enable_sahi: bool,
      slice_size: int,
      overlap_ratio: float,
      model_confidence_threshold: float,
  ):
      detection_model = obtain_detection_model(
          model_confidence_threshold
      )
  
      tracker = Tracker(
          initialization_delay=initialization_delay,
          distance_function="iou",
          hit_counter_max=hit_counter_max,
          filter_factory=OptimizedKalmanFilterFactory(),
          distance_threshold=distance_threshold,
      )
  
      video = Video(input_path=video_path, output_path=output_path)
  
      for i, frame in enumerate(video):
          if i % skip_period == 0:
              if enable_sahi:
                  result = get_sliced_prediction(
                      frame,
                      detection_model,
                      slice_height=slice_size,
                      slice_width=slice_size,
                      overlap_height_ratio=overlap_ratio,
                      overlap_width_ratio=overlap_ratio,
                  )
              else:
                  result = get_prediction(frame, detection_model)
  
              detections = get_detections(result.object_prediction_list)
              tracked_objects = tracker.update(
                  detections=detections, period=skip_period
              )
          else:
              tracked_objects = tracker.update()
  
          draw_boxes(frame, detections)
          draw_tracked_boxes(frame, tracked_objects)
          video.write(frame)
  
file_path: norfair/demos/sahi/src/demo.py
imports: from typing import List
  import numpy
  from sahi.predict import get_prediction, get_sliced_prediction
  from sahi.prediction import PredictionResult
  from utils import create_arg_parser, obtain_detection_model
  from norfair import Detection, Tracker, Video, draw_boxes, draw_tracked_boxes
  from norfair.filter import OptimizedKalmanFilterFactory
label_desc: Use image node_id 2 for calling a global function with example usage: main(video_path, output_path, distance_threshold, skip_period, initialization_delay, hit_counter_max, enable_sahi, slice_size, overlap_ratio, model_confidence_threshold) without return types