code: def __init__(
      self,
      object_prediction_list: List[ObjectPrediction],
      image: Union[Image.Image, str, np.ndarray],
      durations_in_seconds: Optional[Dict] = None,
  ):
      self.image: Image.Image = read_image_as_pil(image)
      self.image_width, self.image_height = self.image.size
      self.object_prediction_list: List[
          ObjectPrediction
      ] = object_prediction_list
      self.durations_in_seconds = durations_in_seconds
  
imports: import copy
  from typing import Dict, List, Optional, Union
  import numpy
  from PIL import Image
  from sahi.annotation import ObjectAnnotation
  from sahi.utils.coco import CocoAnnotation, CocoPrediction
  from sahi.utils.cv import read_image_as_pil, visualize_object_predictions
  from sahi.utils.file import Path
label_desc: Use image node_id 1 to create a new PredictionResult object  with example: obj = PredictionResult(object_prediction_list, image, durations_in_seconds)