code: def _get_merged_mask(
      pred1: ObjectPrediction, pred2: ObjectPrediction
  ) -> Mask:
      mask1 = pred1.mask
      mask2 = pred2.mask
      union_mask = np.logical_or(mask1.bool_mask, mask2.bool_mask)
      return Mask(
          bool_mask=union_mask,
          full_shape=mask1.full_shape,
          shift_amount=mask1.shift_amount,
      )
  
imports: import copy
  from typing import List
  import numpy
  from sahi.annotation import BoundingBox, Category, Mask
  from sahi.postprocess.utils import calculate_area, calculate_box_union, calculate_intersection_area
  from sahi.prediction import ObjectPrediction
label_desc: Use image node_id 6 for calling the UnionMergePostprocess obj's underlying member method code with example usage: obj._get_merged_mask(pred1, pred2) and returns: Mask