def _prune_boxes(
        self, masked_preds: dict[str, np.ndarray], base_preds: dict[str, np.ndarray]
    ) -> dict[str, np.ndarray]:
        """
        Remove bounding boxes from the masked predictions of a single image based on the IoA score with the boxes
        on the base unmasked predictions.

        :param masked_preds: The merged masked predictions of a single image.
        :param base_preds: The base unmasked predictions of a single image.
        :return: The filtered masked predictions with extraneous boxes removed.
        """
        masked_boxes = masked_preds["boxes"]
        masked_labels = masked_preds["labels"]
        masked_scores = masked_preds["scores"]

        base_boxes = base_preds["boxes"]
        base_labels = base_preds["labels"]

        keep_indices = []
        for idx, (masked_box, masked_label) in enumerate(zip(masked_boxes, masked_labels)):
            keep = True
            for base_box, base_label in zip(base_boxes, base_labels):
                if masked_label == base_label:
                    ioa = intersection_over_area(masked_box, base_box)
                    if ioa >= self.prune_threshold:
                        keep = False
                        break

            if keep:
                keep_indices.append(idx)

        pruned_preds = {
            "boxes": masked_boxes[keep_indices],
            "labels": masked_labels[keep_indices],
            "scores": masked_scores[keep_indices],
        }
        return pruned_preds

        Remove bounding boxes from the masked predictions of a single image based on the IoA score with the boxes
        on the base unmasked predictions.

        :param masked_preds: The merged masked predictions of a single image.
        :param base_preds: The base unmasked predictions of a single image.
        :return: The filtered masked predictions with extraneous boxes removed.
        
art/estimators/certification/object_seeker/object_seeker.py