def METHOD_NAME(self, mask_results: InstanceData, seg_preds: Tensor,
                    **kwargs) -> PixelData:
    """Fuse the results of instance and semantic segmentations.
    Args:
        mask_results (:obj:`InstanceData`): Instance segmentation results,
            each contains ``bboxes``, ``labels``, ``scores`` and ``masks``.
        seg_preds (Tensor): The semantic segmentation results,
            (num_stuff + 1, H, W).
    Returns:
        Tensor: The panoptic segmentation result, (H, W).
    """
    id_map, labels = self._lay_masks(mask_results,
                                     self.test_cfg.mask_overlap)
    seg_results = seg_preds.argmax(dim=0)
    seg_results = seg_results + self.num_things_classes
    pan_results = seg_results
    instance_id = 1
    for idx in range(len(mask_results)):
        _mask = id_map == (idx + 1)
        if _mask.sum() == 0:
            continue
        _cls = labels[idx]
        # simply trust detection
        segment_id = _cls + instance_id * INSTANCE_OFFSET
        pan_results[_mask] = segment_id
        instance_id += 1
    ids, counts = torch.unique(
        pan_results % INSTANCE_OFFSET, return_counts=True)
    stuff_ids = ids[ids >= self.num_things_classes]
    stuff_counts = counts[ids >= self.num_things_classes]
    ignore_stuff_ids = stuff_ids[
        stuff_counts < self.test_cfg.stuff_area_limit]
    assert pan_results.ndim == 2
    pan_results[(pan_results.unsqueeze(2) == ignore_stuff_ids.reshape(
        1, 1, -1)).any(dim=2)] = self.num_classes
    pan_results = PixelData(sem_seg=pan_results[None].int())
    return pan_results