def METHOD_NAME(self,
                         trident_results: InstanceList) -> InstanceData:
    """Merge bbox predictions of each branch.
    Args:
        trident_results (List[:obj:`InstanceData`]): A list of InstanceData
            predicted from every branch.
    Returns:
        :obj:`InstanceData`: merged InstanceData.
    """
    bboxes = torch.cat([res.bboxes for res in trident_results])
    scores = torch.cat([res.scores for res in trident_results])
    labels = torch.cat([res.labels for res in trident_results])
    nms_cfg = self.test_cfg['nms']
    results = InstanceData()
    if bboxes.numel() == 0:
        results.bboxes = bboxes
        results.scores = scores
        results.labels = labels
    else:
        det_bboxes, keep = batched_nms(bboxes, scores, labels, nms_cfg)
        results.bboxes = det_bboxes[:, :-1]
        results.scores = det_bboxes[:, -1]
        results.labels = labels[keep]
    if self.test_cfg['max_per_img'] > 0:
        results = results[:self.test_cfg['max_per_img']]
    return results