code: def obtain_detection_model(confidence_threshold: float):
      device = (
          f"cuda:{torch.cuda.current_device()}"
          if torch.cuda.is_available()
          else "cpu"
      )
      yolov5_model_path = "./models/yolov5x6.pt"
      download_yolov5_model(
          model_url="https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5x6.pt",
          destination_path=yolov5_model_path,
      )
      return AutoDetectionModel.from_pretrained(
          model_type="yolov5",
          model_path=yolov5_model_path,
          confidence_threshold=confidence_threshold,
          device=device,
      )
  
file_path: norfair/demos/sahi/src/utils.py
imports: import argparse
  import urllib.request
  from os import path
  from pathlib import Path
  import torch
  from sahi import AutoDetectionModel
label_desc: Use image node_id 2 for calling a global function with example usage: obtain_detection_model(confidence_threshold) and returns: AutoDetectionModel