code: def __init__(self, model_name: str, device: Optional[str] = None):
      if (
          device is not None
          and "cuda" in device
          and not torch.cuda.is_available()
      ):
          raise Exception(
              "Selected device='cuda', but cuda is not available to Pytorch."
          )
      # automatically set device if its None
      elif device is None:
          device = "cuda:0" if torch.cuda.is_available() else "cpu"
      # load model
      self.model = torch.hub.load("ultralytics/yolov5", model_name)
  
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 to create a new YOLO object  with example: obj = YOLO(model_name, device)