code: def to(self, device: torch.device, *, use_half: bool) -> None:
      if use_half:
          self.body_estimation.model.half()
          self.hand_estimation.model.half()
      else:
          self.body_estimation.model.float()
          self.hand_estimation.model.float()
      self.body_estimation.model.to(device)
      self.hand_estimation.model.to(device)
      self.device = device
      self.use_half = use_half
  
file_path: carefree-learn/cflearn/api/cv/third_party/openpose/api.py
imports: import os
  import torch
  import numpy
  from .None import util
  from .body import Body
  from .hand import Hand
  from .....misc.toolkit import download_model
label_desc: Use image node_id 2 for calling the OpenposeDetector obj's underlying member method code with example usage: obj.to(device) without return types