code: def get_detections(
      object_prediction_list: PredictionResult,
  ) -> List[Detection]:
      detections = []
      for prediction in object_prediction_list:
          bbox = prediction.bbox
  
          detection_as_xyxy = bbox.to_voc_bbox()
          bbox = np.array(
              [
                  [detection_as_xyxy[0], detection_as_xyxy[1]],
                  [detection_as_xyxy[2], detection_as_xyxy[3]],
              ]
          )
          detections.append(
              Detection(
                  points=bbox,
                  scores=np.array(
                      [prediction.score.value for _ in bbox]
                  ),
                  label=prediction.category.id,
              )
          )
      return detections
  
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 1 for calling a global function with example usage: get_detections(object_prediction_list) and returns: detections