code: def merge_object_prediction_pair(
      pred1: ObjectPrediction,
      pred2: ObjectPrediction,
  ) -> ObjectPrediction:
      shift_amount = pred1.bbox.shift_amount
      merged_bbox: BoundingBox = get_merged_bbox(pred1, pred2)
      merged_score: float = get_merged_score(pred1, pred2)
      merged_category: Category = get_merged_category(pred1, pred2)
      if pred1.mask and pred2.mask:
          merged_mask: Mask = get_merged_mask(pred1, pred2)
          bool_mask = merged_mask.bool_mask
          full_shape = merged_mask.full_shape
      else:
          bool_mask = None
          full_shape = None
      return ObjectPrediction(
          bbox=merged_bbox.to_xyxy(),
          score=merged_score,
          category_id=merged_category.id,
          category_name=merged_category.name,
          bool_mask=bool_mask,
          shift_amount=shift_amount,
          full_shape=full_shape,
      )
  
imports: from collections.abc import Sequence
  from typing import List, Union
  import numpy
  import torch
  from sahi.annotation import BoundingBox, Category, Mask
  from sahi.prediction import ObjectPrediction
label_desc: Use image node_id 13 for calling a global function with example usage: merge_object_prediction_pair(pred1, pred2) and returns: ObjectPrediction