code: def __init__(self, device: torch.device):
      if cv2 is None:
          raise ValueError("`cv2` is needed for `MiDaSAPI`")
      if timm is None:
          raise ValueError("`timm` is needed for `MiDaSAPI`")
      self.model = MiDaSInference(model_type="dpt_hybrid").to(device)
      self.device = device
  
imports: import math
  import torch
  import numpy
  import torch.nn
  from torchvision.transforms import Compose
  from .core.dpt_depth import DPTDepthModel
  from .core.midas_net import MidasNet
  from .core.midas_net_custom import MidasNet_small
  from .core.transforms import Resize, NormalizeImage, PrepareForNet
  from .....misc.toolkit import download_model
label_desc: Use image node_id 1 to create a new MiDaSAPI object  with example: obj = MiDaSAPI(device)