code: def yolo_detections_to_norfair_detections(
      yolo_detections: torch.tensor,
  ) -> List[Detection]:
      """convert detections_as_xywh to norfair detections"""
      norfair_detections: List[Detection] = []
  
      detections_as_xyxy = yolo_detections.xyxy[0]
      for detection_as_xyxy in detections_as_xyxy:
          bbox = np.array(
              [
                  [
                      detection_as_xyxy[0].item(),
                      detection_as_xyxy[1].item(),
                  ],
                  [
                      detection_as_xyxy[2].item(),
                      detection_as_xyxy[3].item(),
                  ],
              ]
          )
          scores = np.array(
              [detection_as_xyxy[4].item(), detection_as_xyxy[4].item()]
          )
          label = int(detection_as_xyxy[5].item())
          norfair_detections.append(
              Detection(points=bbox, scores=scores, label=label)
          )
  
      return norfair_detections
  
file_path: norfair/demos/keypoints_bounding_boxes/src/demo.py
imports: import argparse
  import sys
  from typing import List, Optional, Union
  import cv2
  import numpy
  import torch
  import norfair
  from norfair import Detection, Tracker, Video
  from norfair.drawing import Color
label_desc: Use image node_id 1 for calling a global function with example usage: yolo_detections_to_norfair_detections(yolo_detections) and returns: norfair_detections