code: def initialize(self, context):
      # Set device type
      if torch.cuda.is_available():
          self.device = torch.device("cuda")
      elif XLA_AVAILABLE:
          self.device = xm.xla_device()
      else:
          self.device = torch.device("cpu")
  
      # Load the model
      properties = context.system_properties
      self.manifest = context.manifest
      model_dir = properties.get("model_dir")
      self.model_pt_path = None
      if "serializedFile" in self.manifest["model"]:
          serialized_file = self.manifest["model"]["serializedFile"]
          self.model_pt_path = os.path.join(model_dir, serialized_file)
      self.model = self._load_torchscript_model(self.model_pt_path)
      logger.debug(
          "Model file %s loaded successfully", self.model_pt_path
      )
  
      self.initialized = True
  
file_path: serve/examples/object_detector/yolo/yolov8/custom_handler.py
imports: import logging
  import os
  from collections import Counter
  import torch
  from torchvision import transforms
  from ultralytics import YOLO
  from ts.torch_handler.object_detector import ObjectDetector
label_desc: Use image node_id 2 for calling the Yolov8Handler obj's underlying member method code with example usage: obj.initialize(context) without return types